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

@ -20,16 +20,12 @@ namespace guecs {
}};
}
void GrabSource::grab() {
sprite->setOrigin({128, 128});
DinkyECS::Entity GrabSource::grab() {
fmt::println("grab! {}", world_entity);
return world_entity;
}
void GrabSource::move(sf::Vector2i position) {
sprite->setPosition({
float(position.x),
float(position.y)
});
fmt::println("move! {} to {},{}", world_entity, position.x, position.y);
}
}