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

@ -9,20 +9,11 @@ namespace guecs {
Clickable make_action(DinkyECS::World& target, Events::GUI event, std::any data);
struct GrabSource : public Sprite {
void grab(sf::RenderWindow& window) {
window.setMouseCursorVisible(false);
sprite->setOrigin({128, 128});
}
void move(sf::Vector2i position) {
sprite->setPosition({
float(position.x),
float(position.y)
});
}
void grab(sf::RenderWindow& window);
void move(sf::Vector2i position);
};
struct DropTarget {
std::function<bool()> action;
};
}