diff --git a/core/include/cubos/core/io/cursor.hpp b/core/include/cubos/core/io/cursor.hpp index eea990e572..a35d8059f1 100644 --- a/core/include/cubos/core/io/cursor.hpp +++ b/core/include/cubos/core/io/cursor.hpp @@ -4,6 +4,8 @@ #pragma once +#include + #ifdef WITH_GLFW #define GLFW_INCLUDE_NONE #include @@ -43,3 +45,5 @@ namespace cubos::core::io #endif }; } // namespace cubos::core::io + +CUBOS_REFLECT_EXTERNAL_DECL(cubos::core::io::Cursor::Standard); diff --git a/core/src/cubos/core/io/cursor.cpp b/core/src/cubos/core/io/cursor.cpp index a0f4404bbf..165bb6a88b 100644 --- a/core/src/cubos/core/io/cursor.cpp +++ b/core/src/cubos/core/io/cursor.cpp @@ -1,6 +1,11 @@ #include +#include +#include using namespace cubos::core; +using cubos::core::io::Cursor; +using cubos::core::reflection::EnumTrait; +using cubos::core::reflection::Type; #ifdef WITH_GLFW io::Cursor::Cursor(GLFWcursor* handle) @@ -18,3 +23,19 @@ io::Cursor::~Cursor() } #endif } + +CUBOS_REFLECT_EXTERNAL_IMPL(Cursor::Standard) +{ + return Type::create("Standard") + .with(EnumTrait{} + .withVariant("Arrow") + .withVariant("IBeam") + .withVariant("Cross") + .withVariant("Hand") + .withVariant("EWResize") + .withVariant("NSResize") + .withVariant("NWSEResize") + .withVariant("NESWResize") + .withVariant("AllResize") + .withVariant("NotAllowed")); +}