#include "gui/guecstra.hpp" namespace guecs { Clickable make_action(DinkyECS::World& target, Events::GUI event) { return {[&, event](auto ent, auto data){ // BUG: I think entityt here shifted and isn't part of the world anymore // BUG: it's actually coming from the GUI so passing it here is wrong // remember that ent is passed in from the UI::mouse handler target.send(event, ent, data); }}; } Clickable make_action(DinkyECS::World& target, Events::GUI event, std::any data) { return {[&, event, data](auto ent, auto){ // BUG: I think entityt here shifted and isn't part of the world anymore // BUG: it's actually coming from the GUI so passing it here is wrong // remember that ent is passed in from the UI::mouse handler target.send(event, ent, data); }}; } DinkyECS::Entity GrabSource::grab() { fmt::println("grab! {}", world_entity); return world_entity; } void GrabSource::move(sf::Vector2i position) { fmt::println("move! {} to {},{}", world_entity, position.x, position.y); } }