diff --git a/include/Cubed/ui/anchor.hpp b/include/Cubed/ui/anchor.hpp index 95fd298..4040a60 100644 --- a/include/Cubed/ui/anchor.hpp +++ b/include/Cubed/ui/anchor.hpp @@ -12,4 +12,7 @@ enum class Anchor { BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT, + + FOLLOW_MOUSE + }; \ No newline at end of file diff --git a/include/Cubed/ui/item_slot.hpp b/include/Cubed/ui/item_slot.hpp index bb21ed2..50b4138 100644 --- a/include/Cubed/ui/item_slot.hpp +++ b/include/Cubed/ui/item_slot.hpp @@ -2,6 +2,7 @@ #include "Cubed/gameplay/block.hpp" #include "Cubed/ui/image.hpp" +#include "Cubed/ui/label.hpp" #include "Cubed/ui/widget.hpp" namespace Cubed { class TextureManager; @@ -21,9 +22,13 @@ private: static constexpr const char* DEFAULT_SLOT_PATH = "texture/ui/slot.png"; void on_render(Renderer& renderer) override; void on_update(float dt) override; + bool handle_mouse_move_event(const MouseMoveEvent& e) override; + bool handle_window_resize_event(const WindowResizeEvent& e) override; std::unique_ptr m_background; std::unique_ptr m_foreground; + std::unique_ptr