More of the drag/drop is handled by the GrabSource/DropTarget components.

This commit is contained in:
Zed A. Shaw 2025-06-09 23:59:44 -04:00
parent 7a551cf83a
commit 570b70ab0c
7 changed files with 36 additions and 81 deletions

View file

@ -13,7 +13,6 @@ namespace gui {
guecs::UI $gui;
GameLevel $level;
std::unordered_map<DinkyECS::Entity, DinkyECS::Entity> contents;
DinkyECS::Entity $selected_entity;
LootUI(GameLevel level);
void init();
@ -27,9 +26,7 @@ namespace gui {
std::optional<DinkyECS::Entity> 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 world_entity);
bool place_slot(DinkyECS::Entity id);
bool place_slot(DinkyECS::Entity gui_id, DinkyECS::Entity world_entity);
};
}