Jazz2::UI::Canvas class

Canvas.

Base classes

class nCine::SceneNode
Base class for the transformation nodes hierarchy.

Derived classes

class HUD
Player HUD.
class InGameConsole
In-game console.
class MpInGameCanvasLayer
In-game canvas on sprite layer for multiplayer.
class MpInGameLobby
In-game lobby screen for multiplayer.

Public static functions

static auto ApplyAlignment(Alignment align, Vector2f vec, Vector2f size) -> Vector2f
Applies alignment settings to a given position vector.

Constructors, destructors, conversion operators

Canvas()

Public functions

void OnUpdate(float timeMult) override
Called every frame to update the object state.
auto OnDraw(RenderQueue& renderQueue) -> bool override
Called when the object needs to be drawn.
void DrawTexture(const Texture& texture, Vector2f pos, std::uint16_t z, Vector2f size, const Vector4f& texCoords, const Colorf& color, bool additiveBlending = false, float angle = 0.0f)
Draws a textured rectangle.
void DrawSolid(Vector2f pos, std::uint16_t z, Vector2f size, const Colorf& color, bool additiveBlending = false)
Draws a solid rectangle.
auto RentRenderCommand() -> RenderCommand*
Rents a render command for rendering on the canvas.
void DrawRenderCommand(RenderCommand* command)
Draws a raw render command.

Public variables

Vector2i ViewSize
View size of the canvas.
float AnimTime
Animation time of the canvas.

Protected static variables

static float AnimTimeMultiplier constexpr
Multiplier of game time for canvas rendering.