#pragma once #include "gui/guecstra.hpp" #include "levelmanager.hpp" #include #include #include #include "events.hpp" namespace gui { class LootUI { public: bool active = false; guecs::UI $gui; GameLevel $level; std::unordered_map contents; LootUI(GameLevel level); void init(); void update(); void render(sf::RenderWindow& window); void update_level(GameLevel &level); bool mouse(float x, float y, bool hover); guecs::GrabSource& get_grab_source(DinkyECS::Entity entity); bool has_grab_source(DinkyECS::Entity gui_id); std::optional begin_grab(DinkyECS::Entity slot); void commit_grab(DinkyECS::Entity slot_id); guecs::DropTarget& get_drop_target(DinkyECS::Entity gui_id); void begin_drop(DinkyECS::Entity entity); void commit_drop(DinkyECS::Entity entity); }; }