Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::ecs::UIVisual Struct Reference

UIVisual — the single UI visual component, merging the former low-level UIRenderer (what the renderer drew) and high-level Image (Simple/Sliced/Tiled/Filled intent that used to be copied into a UIRenderer each frame). One component authored directly; UIElementPlugin reads it and computes the effective UV inline — the deferred copy is gone. More...

#include <UIVisual.hpp>

Public Member Functions

 UIVisual ()=default

Public Attributes

UIVisualType visualType {UIVisualType::None}
resource::TextureHandle texture
glm::vec4 color {1.0f, 1.0f, 1.0f, 1.0f}
UIVisualFit fit {UIVisualFit::Fill}
glm::vec2 uvOffset {0.0f, 0.0f}
glm::vec2 uvScale {1.0f, 1.0f}
glm::vec4 sliceBorder {0.0f}
glm::vec2 tileSize {32.0f, 32.0f}
UIFillMethod fillMethod {UIFillMethod::Horizontal}
UIFillOrigin fillOrigin {UIFillOrigin::Left}
f32 fillAmount {1.0f}
u32 material {0}
bool enabled {true}
i32 uiOrder {0}
u32 uiCullBit {0}

Detailed Description

UIVisual — the single UI visual component, merging the former low-level UIRenderer (what the renderer drew) and high-level Image (Simple/Sliced/Tiled/Filled intent that used to be copied into a UIRenderer each frame). One component authored directly; UIElementPlugin reads it and computes the effective UV inline — the deferred copy is gone.

Geometry comes from the sibling UINode (computed_size_, pivot 0.5). uvOffset/ uvScale are the base sub-region (identity = whole texture); Tiled/Filled derive their final UV from this base at draw time.

Definition at line 84 of file UIVisual.hpp.

Constructor & Destructor Documentation

◆ UIVisual()

esengine::ecs::UIVisual::UIVisual ( )
default

Member Data Documentation

◆ color

glm::vec4 esengine::ecs::UIVisual::color {1.0f, 1.0f, 1.0f, 1.0f}

Definition at line 92 of file UIVisual.hpp.

Referenced by uivisualApplyJS(), and uivisualToJS().

◆ enabled

bool esengine::ecs::UIVisual::enabled {true}

Definition at line 125 of file UIVisual.hpp.

Referenced by uivisualApplyJS(), and uivisualToJS().

◆ fillAmount

f32 esengine::ecs::UIVisual::fillAmount {1.0f}

Definition at line 119 of file UIVisual.hpp.

Referenced by uivisualApplyJS(), and uivisualToJS().

◆ fillMethod

UIFillMethod esengine::ecs::UIVisual::fillMethod {UIFillMethod::Horizontal}

Definition at line 115 of file UIVisual.hpp.

Referenced by uivisualApplyJS(), and uivisualToJS().

◆ fillOrigin

UIFillOrigin esengine::ecs::UIVisual::fillOrigin {UIFillOrigin::Left}

Definition at line 117 of file UIVisual.hpp.

Referenced by uivisualApplyJS(), and uivisualToJS().

◆ fit

UIVisualFit esengine::ecs::UIVisual::fit {UIVisualFit::Fill}

Definition at line 97 of file UIVisual.hpp.

Referenced by uivisualApplyJS(), and uivisualToJS().

◆ material

u32 esengine::ecs::UIVisual::material {0}

Definition at line 122 of file UIVisual.hpp.

Referenced by uivisualApplyJS(), and uivisualToJS().

◆ sliceBorder

glm::vec4 esengine::ecs::UIVisual::sliceBorder {0.0f}

Definition at line 107 of file UIVisual.hpp.

Referenced by uivisualApplyJS(), and uivisualToJS().

◆ texture

resource::TextureHandle esengine::ecs::UIVisual::texture

Definition at line 89 of file UIVisual.hpp.

Referenced by uivisualApplyJS(), and uivisualToJS().

◆ tileSize

glm::vec2 esengine::ecs::UIVisual::tileSize {32.0f, 32.0f}

Definition at line 111 of file UIVisual.hpp.

Referenced by uivisualApplyJS(), and uivisualToJS().

◆ uiCullBit

u32 esengine::ecs::UIVisual::uiCullBit {0}

Definition at line 132 of file UIVisual.hpp.

Referenced by esengine::ui_getCullBit().

◆ uiOrder

i32 esengine::ecs::UIVisual::uiOrder {0}

Definition at line 128 of file UIVisual.hpp.

Referenced by esengine::ui_getRenderOrder().

◆ uvOffset

glm::vec2 esengine::ecs::UIVisual::uvOffset {0.0f, 0.0f}

Definition at line 101 of file UIVisual.hpp.

Referenced by uivisualApplyJS(), and uivisualToJS().

◆ uvScale

glm::vec2 esengine::ecs::UIVisual::uvScale {1.0f, 1.0f}

Definition at line 103 of file UIVisual.hpp.

Referenced by uivisualApplyJS(), and uivisualToJS().

◆ visualType

UIVisualType esengine::ecs::UIVisual::visualType {UIVisualType::None}

Definition at line 86 of file UIVisual.hpp.

Referenced by uivisualApplyJS(), and uivisualToJS().


The documentation for this struct was generated from the following file:
  • /home/runner/work/estella/estella/src/esengine/ecs/components/UIVisual.hpp