13 entt::meta_factory<ui_document_component>{}
14 .type(
"ui_document_component"_hs)
30 .data<&ui_document_component::asset>(
"asset"_hs)
40 bool enabled = obj.is_enabled();
41 try_save(ar, ser20::make_nvp(
"enabled", enabled));
42 try_save(ar, ser20::make_nvp(
"asset", obj.asset));
51 try_load(ar, ser20::make_nvp(
"enabled", enabled));
52 obj.set_enabled(enabled);
53 try_load(ar, ser20::make_nvp(
"asset", obj.asset));
attributes::value_type attribute
std::map< std::string, meta_any > attributes
BinaryInputArchive iarchive_binary_t
simd::JSONOutputArchive oarchive_associative_t
BinaryOutputArchive oarchive_binary_t
simd::JSONInputArchive iarchive_associative_t
#define SAVE_INSTANTIATE(cls, Archive)
auto try_save(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool
#define LOAD_INSTANTIATE(cls, Archive)
auto try_load(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool
Component that holds a reference to a UI document for RmlUi rendering.
void set_enabled(bool enabled)
Set the enabled state of the document.
auto is_enabled() const -> bool
Check if document is currently enabled.