Even better API, but still not the best organization. This will let me implement both sides, then I can pull it out and try to generalize it into a few guecs components.

This commit is contained in:
Zed A. Shaw 2025-06-08 23:55:59 -04:00
parent 3e0adf0c22
commit 4b0d76bbcc
7 changed files with 63 additions and 22 deletions

View file

@ -21,9 +21,16 @@ namespace gui {
void render(sf::RenderWindow& window);
void update_level(GameLevel &level);
bool mouse(float x, float y, bool hover);
std::optional<DinkyECS::Entity> start_grab(DinkyECS::Entity slot);
guecs::GrabSource& get_grab_source(DinkyECS::Entity entity);
bool has_grab_source(DinkyECS::Entity gui_id);
void commit_drop(DinkyECS::Entity slot_id);
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 entity);
void commit_drop(DinkyECS::Entity entity);
};
}