Unravel Engine C++ Reference
|
Component that holds a reference to a UI document for RmlUi rendering. More...
#include <ui_document_component.h>
Public Member Functions | |
auto | is_loaded () const -> bool |
Check if document is currently loaded. | |
auto | is_enabled () const -> bool |
Check if document is currently enabled. | |
void | set_enabled (bool enabled) |
Set the enabled state of the document. | |
![]() | |
auto | operator= (const owned_component &other) -> owned_component &=default |
void | set_owner (entt::handle owner) |
Sets the owner of the component. | |
auto | get_owner () const noexcept -> entt::const_handle |
Gets the owner of the component. | |
auto | get_owner () noexcept -> entt::handle |
Gets the owner of the component. | |
![]() | |
void | touch () |
Marks the component as 'touched'. | |
Public Attributes | |
asset_handle< ui_tree > | asset |
Path to the UI document file (HTML/RML) | |
Rml::ElementDocument * | document = nullptr |
Shared pointer to the loaded RmlUi document. | |
uint64_t | version = 0 |
![]() | |
bool | eto {} |
Disable empty type optimizations. | |
Additional Inherited Members | |
![]() | |
using | base |
![]() | |
template<typename T > | |
static void | on_create_component (entt::registry &r, entt::entity e) |
template<typename T > | |
static void | on_destroy_component (entt::registry &r, entt::entity e) |
![]() | |
static constexpr bool | in_place_delete |
Indicates if the component can be deleted in place. | |
Component that holds a reference to a UI document for RmlUi rendering.
This component manages an RmlUi document within the shared UI context. Each component instance holds its own document while sharing the global UI context.
Definition at line 25 of file ui_document_component.h.
|
nodiscard |
Check if document is currently enabled.
Definition at line 16 of file ui_document_component.cpp.
|
nodiscard |
Check if document is currently loaded.
Definition at line 11 of file ui_document_component.cpp.
void unravel::ui_document_component::set_enabled | ( | bool | enabled | ) |
Set the enabled state of the document.
enabled | True if document should be enabled |
Definition at line 21 of file ui_document_component.cpp.
asset_handle<ui_tree> unravel::ui_document_component::asset |
Path to the UI document file (HTML/RML)
Definition at line 28 of file ui_document_component.h.
Rml::ElementDocument* unravel::ui_document_component::document = nullptr |
Shared pointer to the loaded RmlUi document.
Definition at line 32 of file ui_document_component.h.
uint64_t unravel::ui_document_component::version = 0 |
Definition at line 34 of file ui_document_component.h.