3#include <engine/engine_export.h>
7#include <hpp/utility.hpp>
10#include <entt/entt.hpp>
17 class ElementDocument;
23 struct ui_document_component;
107 auto is_root_element(
rtti::context& ctx, Rml::Element* element) -> bool;
109 Rml::Context* ui_context_ =
nullptr;
110 Rml::ElementDocument* test_document_ =
nullptr;
111 std::shared_ptr<int> sentinel_ = std::make_shared<int>();
std::shared_ptr< frame_buffer > ptr
std::chrono::duration< float > delta_t
Component that holds a reference to a UI document for RmlUi rendering.
System responsible for managing user interface components and rendering.
void on_os_event(rtti::context &ctx, os::event &event)
Handle OS events and forward to RmlUi.
auto init(rtti::context &ctx) -> bool
Initializes the UI system with the given context.
static void on_create_component(entt::registry &r, entt::entity e)
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.
static void on_destroy_component(entt::registry &r, entt::entity e)
auto deinit(rtti::context &ctx) -> bool
Deinitializes the UI system with the given context.
void register_component_callbacks(rtti::context &ctx)
Register component creation/destruction callbacks with ECS.
void load_fonts()
Load fonts.