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

#include <UILayoutSystem.hpp>

Public Member Functions

f32 width () const
f32 height () const
f32 centerX () const
f32 centerY () const

Public Attributes

f32 left
f32 bottom
f32 right
f32 top

Detailed Description

The world-space box a UI subtree is laid out within — the "screen".

Its SIZE is the available box Yoga solves against; its CENTER is where that box sits in the world, which is what places a screen root (see UILayoutSystem.cpp). Both matter: a box that only resized needs a new solve, a box that only moved needs the roots repositioned and nothing else.

Definition at line 20 of file UILayoutSystem.hpp.

Member Function Documentation

◆ centerX()

f32 esengine::ecs::LayoutRect::centerX ( ) const
inlinenodiscard

Definition at line 28 of file UILayoutSystem.hpp.

References left, and right.

Referenced by esengine::ecs::UISystem::layoutUpdate().

◆ centerY()

f32 esengine::ecs::LayoutRect::centerY ( ) const
inlinenodiscard

Definition at line 29 of file UILayoutSystem.hpp.

References bottom, and top.

Referenced by esengine::ecs::UISystem::layoutUpdate().

◆ height()

f32 esengine::ecs::LayoutRect::height ( ) const
inlinenodiscard

Definition at line 27 of file UILayoutSystem.hpp.

References bottom, and top.

Referenced by esengine::ecs::UISystem::layoutUpdate().

◆ width()

f32 esengine::ecs::LayoutRect::width ( ) const
inlinenodiscard

Definition at line 26 of file UILayoutSystem.hpp.

References left, and right.

Referenced by esengine::ecs::UISystem::layoutUpdate().

Member Data Documentation

◆ bottom

f32 esengine::ecs::LayoutRect::bottom

Definition at line 22 of file UILayoutSystem.hpp.

Referenced by centerY(), and height().

◆ left

f32 esengine::ecs::LayoutRect::left

Definition at line 21 of file UILayoutSystem.hpp.

Referenced by centerX(), and width().

◆ right

f32 esengine::ecs::LayoutRect::right

Definition at line 23 of file UILayoutSystem.hpp.

Referenced by centerX(), and width().

◆ top

f32 esengine::ecs::LayoutRect::top

Definition at line 24 of file UILayoutSystem.hpp.

Referenced by centerY(), and height().


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