#pragma once #include "game/components.hpp" #include "events.hpp" #include #include "graphics/textures.hpp" namespace guecs { Clickable make_action(guecs::Entity gui_id, game::Event event, const std::source_location location = std::source_location::current()); Clickable make_action(guecs::Entity gui_id, game::Event event, std::any data, const std::source_location location = std::source_location::current()); struct GrabSource { DinkyECS::Entity world_entity; std::function commit; std::shared_ptr sprite = nullptr; DinkyECS::Entity grab(); void setSprite(guecs::UI& gui, guecs::Entity gui_id); void move(sf::Vector2f pos); }; struct DropTarget { std::function commit; }; }