More of the drag/drop is handled by the GrabSource/DropTarget components.
This commit is contained in:
parent
7a551cf83a
commit
570b70ab0c
7 changed files with 36 additions and 81 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue