|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
#include <UIScroll.hpp>
Public Attributes | |
| bool | enabled {true} |
| u32 | content {0} |
| bool | horizontal {false} |
| bool | vertical {true} |
| ScrollMovement | movement {ScrollMovement::Clamped} |
| f32 | wheelSpeed {1.0f} |
| bool | dragScroll {true} |
| f32 | decelerationRate {0.135f} |
A scrollable viewport, authored in the scene.
The behaviour lives in the SDK's UI behaviour plugin, which attaches a ScrollContainer to any entity carrying this component: wheel and drag move content inside this node's box, which clips it (pair with a UIMask — the ScrollView template does).
It exists because scrolling used to be reachable only by CONSTRUCTING the ScrollView widget from game code. A scene could describe the parts of a scroll area — the clipped box, the oversized child — but not the fact that it scrolls, so a ScrollView dropped from the editor's Create menu sat there.
Definition at line 32 of file UIScroll.hpp.
| u32 esengine::ecs::UIScroll::content {0} |
The child that moves. Unset ⇒ this node's first child.
Definition at line 38 of file UIScroll.hpp.
Referenced by uiscrollApplyJS(), and uiscrollToJS().
| f32 esengine::ecs::UIScroll::decelerationRate {0.135f} |
How fast a flick decays, as the fraction of velocity kept per second. 0 ends the flick on release; the default is the usual touch-UI glide.
Definition at line 59 of file UIScroll.hpp.
Referenced by uiscrollApplyJS(), and uiscrollToJS().
| bool esengine::ecs::UIScroll::dragScroll {true} |
Definition at line 52 of file UIScroll.hpp.
Referenced by uiscrollApplyJS(), and uiscrollToJS().
| bool esengine::ecs::UIScroll::enabled {true} |
Definition at line 34 of file UIScroll.hpp.
Referenced by uiscrollApplyJS(), and uiscrollToJS().
| bool esengine::ecs::UIScroll::horizontal {false} |
Definition at line 41 of file UIScroll.hpp.
Referenced by uiscrollApplyJS(), and uiscrollToJS().
| ScrollMovement esengine::ecs::UIScroll::movement {ScrollMovement::Clamped} |
Definition at line 46 of file UIScroll.hpp.
Referenced by uiscrollApplyJS(), and uiscrollToJS().
| bool esengine::ecs::UIScroll::vertical {true} |
Definition at line 43 of file UIScroll.hpp.
Referenced by uiscrollApplyJS(), and uiscrollToJS().
| f32 esengine::ecs::UIScroll::wheelSpeed {1.0f} |
Wheel notches → pixels, and whether a drag inside the box scrolls it.
Definition at line 50 of file UIScroll.hpp.
Referenced by uiscrollApplyJS(), and uiscrollToJS().