49template<
typename TYPE>
53template<
typename TYPE, std::
size_t i = 0>
56 if constexpr (i < TYPE::Traits::num_fields)
58 using field_tuple =
typename TYPE::Traits::field_types;
59 using field_type =
typename std::tuple_element<i, field_tuple>::type;
60 ImGui::Text(TYPE::Traits::field_names[i]);
70template<
typename TYPE>
74 if constexpr (
requires { &TYPE::Traits::num_fields; })
76 if constexpr (TYPE::Traits::num_fields > 0 && !std::is_enum<TYPE>())
Component inspection functions.
Definition componentinspection.h:29
Util::Array< DrawFunc > inspectors
Definition componentinspection.h:46
ComponentInspection()
Definition componentinspection.cc:88
static ComponentInspection * Singleton
Definition componentinspection.h:44
static void Register(ComponentId component, DrawFunc)
Definition componentinspection.cc:55
void(*)(Game::ComponentId, void *, bool *) DrawFunc
Definition componentinspection.h:31
static void DrawInspector(ComponentId component, void *data, bool *commit)
Definition componentinspection.cc:74
static void Destroy()
This static method is used to destroy the registry object and should be called right before the main ...
Definition componentinspection.cc:42
~ComponentInspection()
Definition componentinspection.cc:96
static ComponentInspection * Instance()
The registry's constructor is called by the Instance() method, and nobody else.
Definition componentinspection.cc:25
Nebula's dynamic array class.
Definition array.h:60
Game::EditorState.
Definition orientation.h:7
MemDb::AttributeId ComponentId
Definition componentid.h:15
void ComponentDrawFuncT< Util::Colour >(ComponentId component, void *data, bool *commit)
Definition componentinspection.cc:289
void ComponentDrawFuncT< Game::Entity >(ComponentId component, void *data, bool *commit)
Definition componentinspection.cc:106
void ComponentDrawFuncT< Math::mat4 >(ComponentId component, void *data, bool *commit)
Definition componentinspection.cc:205
void ComponentDrawFuncT(ComponentId component, void *data, bool *commit)
Definition componentinspection.h:72
void ComponentDrawFuncT< bool >(ComponentId component, void *data, bool *commit)
Definition componentinspection.cc:122
void ComponentDrawFuncT< Game::Position >(ComponentId component, void *data, bool *commit)
Definition componentinspection.cc:241
void ComponentDrawFuncT< Util::StringAtom >(ComponentId component, void *data, bool *commit)
Definition componentinspection.cc:181
void ComponentDrawFuncT< int >(ComponentId component, void *data, bool *commit)
Definition componentinspection.cc:136
void ComponentDrawFuncT< Game::Orientation >(ComponentId component, void *data, bool *commit)
Definition componentinspection.cc:257
void ComponentDrawFuncT< float >(ComponentId component, void *data, bool *commit)
Definition componentinspection.cc:166
void InspectorDrawField(ComponentId component, void *data, bool *commit)
Definition componentinspection.h:54
void ComponentDrawFuncT< uint >(ComponentId component, void *data, bool *commit)
Definition componentinspection.cc:151
void ComponentDrawFuncT< Game::Scale >(ComponentId component, void *data, bool *commit)
Definition componentinspection.cc:273
void ComponentDrawFuncT< Math::vec3 >(ComponentId component, void *data, bool *commit)
Definition componentinspection.cc:226
Definition attributeid.h:19