diff --git a/headers/enduro2d/high/components/actor.hpp b/headers/enduro2d/high/components/actor.hpp index fc97e97b..0e889f6a 100644 --- a/headers/enduro2d/high/components/actor.hpp +++ b/headers/enduro2d/high/components/actor.hpp @@ -9,6 +9,9 @@ #include "../_high.hpp" #include "../factory.hpp" +#include "../gobject.hpp" +#include "../inspector.hpp" + #include "../node.hpp" namespace e2d @@ -25,7 +28,10 @@ namespace e2d private: node_iptr node_; }; +} +namespace e2d +{ template <> class factory_loader final : factory_loader<> { public: @@ -41,6 +47,17 @@ namespace e2d }; } +namespace e2d +{ + template <> + class component_inspector final : component_inspector<> { + public: + static const char* title; + + void operator()(gcomponent& c) const; + }; +} + namespace e2d { inline actor::actor(const node_iptr& node) diff --git a/headers/enduro2d/high/components/behaviour.hpp b/headers/enduro2d/high/components/behaviour.hpp index 95a055d4..2fd47578 100644 --- a/headers/enduro2d/high/components/behaviour.hpp +++ b/headers/enduro2d/high/components/behaviour.hpp @@ -9,6 +9,9 @@ #include "../_high.hpp" #include "../factory.hpp" +#include "../gobject.hpp" +#include "../inspector.hpp" + #include "../assets/script_asset.hpp" namespace e2d @@ -27,7 +30,10 @@ namespace e2d sol::table meta_; script_asset::ptr script_; }; +} +namespace e2d +{ template <> class factory_loader final : factory_loader<> { public: @@ -43,6 +49,18 @@ namespace e2d }; } +namespace e2d +{ + template <> + class component_inspector final : component_inspector<> { + public: + static const char* title; + + void operator()(gcomponent& c) const; + }; +} + + namespace e2d { inline behaviour& behaviour::meta(sol::table value) noexcept { diff --git a/headers/enduro2d/high/components/camera.hpp b/headers/enduro2d/high/components/camera.hpp index f3864fa7..48162e6c 100644 --- a/headers/enduro2d/high/components/camera.hpp +++ b/headers/enduro2d/high/components/camera.hpp @@ -9,6 +9,8 @@ #include "../_high.hpp" #include "../factory.hpp" +#include "../gobject.hpp" +#include "../inspector.hpp" namespace e2d { @@ -34,7 +36,10 @@ namespace e2d render_target_ptr target_ = nullptr; color background_ = color::clear(); }; +} +namespace e2d +{ template <> class factory_loader final : factory_loader<> { public: @@ -50,6 +55,17 @@ namespace e2d }; } +namespace e2d +{ + template <> + class component_inspector final : component_inspector<> { + public: + static const char* title; + + void operator()(gcomponent& c) const; + }; +} + namespace e2d { inline camera& camera::depth(i32 value) noexcept { diff --git a/headers/enduro2d/high/components/flipbook_player.hpp b/headers/enduro2d/high/components/flipbook_player.hpp index bfe6b4e6..913fee59 100644 --- a/headers/enduro2d/high/components/flipbook_player.hpp +++ b/headers/enduro2d/high/components/flipbook_player.hpp @@ -9,6 +9,9 @@ #include "../_high.hpp" #include "../factory.hpp" +#include "../gobject.hpp" +#include "../inspector.hpp" + #include "../assets/flipbook_asset.hpp" namespace e2d @@ -56,7 +59,10 @@ namespace e2d str_hash sequence_; flipbook_asset::ptr flipbook_; }; +} +namespace e2d +{ template <> class factory_loader final : factory_loader<> { public: @@ -72,6 +78,17 @@ namespace e2d }; } +namespace e2d +{ + template <> + class component_inspector final : component_inspector<> { + public: + static const char* title; + + void operator()(gcomponent& c) const; + }; +} + namespace e2d { inline flipbook_player::flipbook_player(const flipbook_asset::ptr& flipbook) diff --git a/headers/enduro2d/high/components/label.hpp b/headers/enduro2d/high/components/label.hpp index 33e5dd7a..139030ed 100644 --- a/headers/enduro2d/high/components/label.hpp +++ b/headers/enduro2d/high/components/label.hpp @@ -9,6 +9,9 @@ #include "../_high.hpp" #include "../factory.hpp" +#include "../gobject.hpp" +#include "../inspector.hpp" + #include "../assets/font_asset.hpp" namespace e2d @@ -77,7 +80,13 @@ namespace e2d f32 outline_width_ = 0.f; color32 outline_color_ = color32::white(); }; +} +ENUM_HPP_REGISTER_TRAITS(e2d::label::haligns) +ENUM_HPP_REGISTER_TRAITS(e2d::label::valigns) + +namespace e2d +{ template <> class factory_loader