vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::UICanvas Struct Reference

Root of a screen-space UI layer. More...

#include <ui_canvas.h>

Public Types

enum class  ScaleMode : uint8_t { Fixed , ScaleWithHeight , Count }
 How the canvas maps authored pixels to on-screen pixels. More...

Public Attributes

float referenceHeight = 1080.0f
 Authoring height in pixels; ScaleWithHeight scales against it.
int32_t sortOrder = 0
 Draw order across canvases; higher draws on top.
bool visible = true
 Skip the canvas and its whole subtree when false.

Detailed Description

Root of a screen-space UI layer.

Descendant UIElements lay out against a reference height, scaled uniformly to the live viewport. Several canvases draw in ascending sortOrder.

Member Enumeration Documentation

◆ ScaleMode

enum class Vkm::Engine::UICanvas::ScaleMode : uint8_t
strong

How the canvas maps authored pixels to on-screen pixels.

Enumerator
Fixed 

One authored pixel equals one screen pixel.

ScaleWithHeight 

Scale uniformly by viewportHeight / referenceHeight.

Count 

Sentinel; keep last. Drives the VKM_ENUM_NAMES check.


The documentation for this struct was generated from the following file: