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

UINode — the CSS box-model layout input (the CSS/Flex primary layout model). More...

#include <UINode.hpp>

Public Member Functions

 UINode ()=default

Public Attributes

UIPositionType position {UIPositionType::Relative}
UIDisplay display {UIDisplay::Flex}
f32 opacity {1.0f}
UIPointerEvents pointerEvents {UIPointerEvents::Auto}
Dimension width {0.0f, 2}
Dimension height {0.0f, 2}
Dimension minWidth {0.0f, 2}
Dimension minHeight {0.0f, 2}
Dimension maxWidth {0.0f, 2}
Dimension maxHeight {0.0f, 2}
f32 flexGrow {0.0f}
f32 flexShrink {1.0f}
Dimension flexBasis {0.0f, 2}
AlignSelf alignSelf {AlignSelf::Auto}
Dimension marginLeft {0.0f, 0}
Dimension marginTop {0.0f, 0}
Dimension marginRight {0.0f, 0}
Dimension marginBottom {0.0f, 0}
Dimension insetLeft {0.0f, 2}
Dimension insetTop {0.0f, 2}
Dimension insetRight {0.0f, 2}
Dimension insetBottom {0.0f, 2}
glm::vec2 computed_size_ {0.0f}
bool hidden_in_tree_ {false}
f32 alpha_in_tree_ {1.0f}
bool pointer_blocked_in_tree_ {false}
u8 anim_override_ {0}

Static Public Attributes

static constexpr u8 ANIM_POS_X = 1
static constexpr u8 ANIM_POS_Y = 2
static constexpr u8 ANIM_ROT_Z = 4
static constexpr u8 ANIM_SCALE_X = 8
static constexpr u8 ANIM_SCALE_Y = 16

Detailed Description

UINode — the CSS box-model layout input (the CSS/Flex primary layout model).

Replaces the RectTransform anchor/offset/pivot model (UIRect) as the primary way to author UI geometry: every size is a Dimension (px / percent / auto), fed straight into the single-pass Yoga solver. Anchors live on the optional UIAnchors component for holdouts. unit literals below: 0=Px, 1=Percent, 2=Auto (mirrors the TS DimensionUnit enum).

Container properties (direction/justify/align/gap) stay on FlexContainer (folded into UILayout in F4). Absolute positioning (position + inset) is added when the layout pass implements it.

Definition at line 79 of file UINode.hpp.

Constructor & Destructor Documentation

◆ UINode()

esengine::ecs::UINode::UINode ( )
default

Member Data Documentation

◆ alignSelf

AlignSelf esengine::ecs::UINode::alignSelf {AlignSelf::Auto}

Definition at line 122 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ alpha_in_tree_

f32 esengine::ecs::UINode::alpha_in_tree_ {1.0f}

Definition at line 158 of file UINode.hpp.

◆ anim_override_

u8 esengine::ecs::UINode::anim_override_ {0}

Definition at line 163 of file UINode.hpp.

◆ ANIM_POS_X

u8 esengine::ecs::UINode::ANIM_POS_X = 1
staticconstexpr

Definition at line 164 of file UINode.hpp.

Referenced by esengine::animation::applyTweenValue().

◆ ANIM_POS_Y

u8 esengine::ecs::UINode::ANIM_POS_Y = 2
staticconstexpr

Definition at line 165 of file UINode.hpp.

Referenced by esengine::animation::applyTweenValue().

◆ ANIM_ROT_Z

u8 esengine::ecs::UINode::ANIM_ROT_Z = 4
staticconstexpr

Definition at line 166 of file UINode.hpp.

Referenced by esengine::animation::applyTweenValue().

◆ ANIM_SCALE_X

u8 esengine::ecs::UINode::ANIM_SCALE_X = 8
staticconstexpr

Definition at line 167 of file UINode.hpp.

Referenced by esengine::animation::applyTweenValue().

◆ ANIM_SCALE_Y

u8 esengine::ecs::UINode::ANIM_SCALE_Y = 16
staticconstexpr

Definition at line 168 of file UINode.hpp.

Referenced by esengine::animation::applyTweenValue().

◆ computed_size_

glm::vec2 esengine::ecs::UINode::computed_size_ {0.0f}

◆ display

UIDisplay esengine::ecs::UINode::display {UIDisplay::Flex}

Definition at line 85 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ flexBasis

Dimension esengine::ecs::UINode::flexBasis {0.0f, 2}

Definition at line 120 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ flexGrow

f32 esengine::ecs::UINode::flexGrow {0.0f}

Definition at line 116 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ flexShrink

f32 esengine::ecs::UINode::flexShrink {1.0f}

Definition at line 118 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ height

Dimension esengine::ecs::UINode::height {0.0f, 2}

Definition at line 104 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ hidden_in_tree_

bool esengine::ecs::UINode::hidden_in_tree_ {false}

Definition at line 152 of file UINode.hpp.

Referenced by esengine::getUINodeHiddenInTree().

◆ insetBottom

Dimension esengine::ecs::UINode::insetBottom {0.0f, 2}

Definition at line 144 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ insetLeft

Dimension esengine::ecs::UINode::insetLeft {0.0f, 2}

Definition at line 138 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ insetRight

Dimension esengine::ecs::UINode::insetRight {0.0f, 2}

Definition at line 142 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ insetTop

Dimension esengine::ecs::UINode::insetTop {0.0f, 2}

Definition at line 140 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ marginBottom

Dimension esengine::ecs::UINode::marginBottom {0.0f, 0}

Definition at line 132 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ marginLeft

Dimension esengine::ecs::UINode::marginLeft {0.0f, 0}

Definition at line 126 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ marginRight

Dimension esengine::ecs::UINode::marginRight {0.0f, 0}

Definition at line 130 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ marginTop

Dimension esengine::ecs::UINode::marginTop {0.0f, 0}

Definition at line 128 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ maxHeight

Dimension esengine::ecs::UINode::maxHeight {0.0f, 2}

Definition at line 112 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ maxWidth

Dimension esengine::ecs::UINode::maxWidth {0.0f, 2}

Definition at line 110 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ minHeight

Dimension esengine::ecs::UINode::minHeight {0.0f, 2}

Definition at line 108 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ minWidth

Dimension esengine::ecs::UINode::minWidth {0.0f, 2}

Definition at line 106 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ opacity

f32 esengine::ecs::UINode::opacity {1.0f}

Subtree opacity, multiplied down the tree like CSS opacity — the one knob that fades a whole panel. It multiplies into each descendant's own alpha (it does NOT composite the subtree offscreen first), so overlapping children show through one another mid-fade; that is the cheap, universal behaviour, and the same trade every UI toolkit's group-alpha makes.

Definition at line 95 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ pointer_blocked_in_tree_

bool esengine::ecs::UINode::pointer_blocked_in_tree_ {false}

Definition at line 159 of file UINode.hpp.

◆ pointerEvents

UIPointerEvents esengine::ecs::UINode::pointerEvents {UIPointerEvents::Auto}

Definition at line 98 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ position

UIPositionType esengine::ecs::UINode::position {UIPositionType::Relative}

Definition at line 82 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().

◆ width

Dimension esengine::ecs::UINode::width {0.0f, 2}

Definition at line 102 of file UINode.hpp.

Referenced by uinodeApplyJS(), and uinodeToJS().


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