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:
parent
842aac3127
commit
461ad03d27
8 changed files with 93 additions and 70 deletions
|
@ -19,4 +19,18 @@ namespace guecs {
|
|||
target.send<Events::GUI>(event, ent, data);
|
||||
}};
|
||||
}
|
||||
|
||||
|
||||
void GrabSource::grab(sf::RenderWindow& window) {
|
||||
window.setMouseCursorVisible(false);
|
||||
sprite->setOrigin({128, 128});
|
||||
}
|
||||
|
||||
void GrabSource::move(sf::Vector2i position) {
|
||||
sprite->setPosition({
|
||||
float(position.x),
|
||||
float(position.y)
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue