Taking things from the LootUI to the StatusUI works way better now and there's a DropTarget to match the GrabSource.

This commit is contained in:
Zed A. Shaw 2025-06-08 00:37:30 -04:00
parent 842aac3127
commit 461ad03d27
8 changed files with 93 additions and 70 deletions

View file

@ -12,7 +12,7 @@ namespace gui {
bool active = false;
guecs::UI $gui;
GameLevel $level;
std::vector<DinkyECS::Entity> contents;
std::unordered_map<DinkyECS::Entity, DinkyECS::Entity> contents;
LootUI(GameLevel level);
@ -21,8 +21,9 @@ namespace gui {
void render(sf::RenderWindow& window);
void update_level(GameLevel &level);
bool mouse(float x, float y, bool hover);
std::optional<DinkyECS::Entity> select_slot(int slot);
void remove_slot(int slot_id);
std::optional<DinkyECS::Entity> select_slot(DinkyECS::Entity slot);
void remove_slot(DinkyECS::Entity slot_id);
guecs::GrabSource& get_grabber(DinkyECS::Entity entity);
bool has_grabber(DinkyECS::Entity gui_id);
};
}