Unravel Engine C++ Reference
|
System responsible for managing user interface components and rendering. More...
#include <ui_system.h>
Public Member Functions | |
auto | init (rtti::context &ctx) -> bool |
Initializes the UI system with the given context. | |
auto | deinit (rtti::context &ctx) -> bool |
Deinitializes the UI system with the given context. | |
void | on_frame_update (rtti::context &ctx, delta_t dt) |
Update UI system (called every frame) | |
void | on_frame_render (const gfx::frame_buffer::ptr &output, delta_t dt) |
Render UI (called every frame after update) | |
auto | get_context () -> Rml::Context * |
Get the main RmlUi context. | |
void | on_os_event (rtti::context &ctx, os::event &event) |
Handle OS events and forward to RmlUi. | |
void | load_fonts () |
Load fonts. | |
void | register_component_callbacks (rtti::context &ctx) |
Register component creation/destruction callbacks with ECS. | |
Static Public Member Functions | |
static void | on_create_component (entt::registry &r, entt::entity e) |
static void | on_destroy_component (entt::registry &r, entt::entity e) |
System responsible for managing user interface components and rendering.
This system integrates RmlUi for HTML/CSS-based user interfaces with the engine's rendering and input systems. It provides a high-level API for loading and managing UI documents.
Definition at line 33 of file ui_system.h.
auto unravel::ui_system::deinit | ( | rtti::context & | ctx | ) | -> bool |
Deinitializes the UI system with the given context.
ctx | The context to deinitialize. |
Definition at line 100 of file ui_system.cpp.
auto unravel::ui_system::get_context | ( | ) | -> Rml::Context* |
Get the main RmlUi context.
Definition at line 174 of file ui_system.cpp.
auto unravel::ui_system::init | ( | rtti::context & | ctx | ) | -> bool |
Initializes the UI system with the given context.
ctx | The context to initialize with. |
Definition at line 42 of file ui_system.cpp.
void unravel::ui_system::load_fonts | ( | ) |
Load fonts.
Definition at line 271 of file ui_system.cpp.
|
static |
Definition at line 307 of file ui_system.cpp.
|
static |
Definition at line 311 of file ui_system.cpp.
void unravel::ui_system::on_frame_render | ( | const gfx::frame_buffer::ptr & | output, |
delta_t | dt ) |
Render UI (called every frame after update)
output | Output frame buffer |
dt | Delta time since last frame |
Definition at line 155 of file ui_system.cpp.
void unravel::ui_system::on_frame_update | ( | rtti::context & | ctx, |
delta_t | dt ) |
Update UI system (called every frame)
ctx | Engine context |
dt | Delta time since last frame |
Definition at line 139 of file ui_system.cpp.
void unravel::ui_system::on_os_event | ( | rtti::context & | ctx, |
os::event & | event ) |
Handle OS events and forward to RmlUi.
ctx | Engine context |
event | OS event to process |
Definition at line 180 of file ui_system.cpp.
void unravel::ui_system::register_component_callbacks | ( | rtti::context & | ctx | ) |
Register component creation/destruction callbacks with ECS.
ctx | Engine context |
Definition at line 321 of file ui_system.cpp.