5#include "core/reflect.h"
60bool hasCanvasAncestor(
const Scene& scene, EntityId
id);
66VKM_REFLECT_BEGIN(::Vkm::Engine::UICanvas)
67 VKM_F(referenceHeight)
Central registry managing entities and an open set of component types.
Definition scene.h:29
Root of a screen-space UI layer.
Definition ui_canvas.h:18
static float scaleIn(const UICanvas &canvas, float viewHeight)
Screen pixels a pixel of canvas spans, drawn into a view viewHeight pixels tall.
Definition ui_canvas.h:43
ScaleMode
How the canvas maps authored pixels to on-screen pixels.
Definition ui_canvas.h:22
@ Fixed
One authored pixel equals one screen pixel.
Definition ui_canvas.h:23
@ ScaleWithHeight
Scale uniformly by viewportHeight / referenceHeight.
Definition ui_canvas.h:24
@ Count
Sentinel; keep last. Drives the VKM_ENUM_NAMES check.
Definition ui_canvas.h:25
float referenceHeight
Authoring height in pixels; ScaleWithHeight scales against it.
Definition ui_canvas.h:29
int32_t sortOrder
Draw order across canvases; higher draws on top.
Definition ui_canvas.h:32
bool visible
Skip the canvas and its whole subtree when false.
Definition ui_canvas.h:34