Refactored the mouse handling to use the new guecss Modifiers system and improved Clickable.
This commit is contained in:
parent
ad0069e899
commit
a86912705c
20 changed files with 67 additions and 64 deletions
|
@ -2,15 +2,14 @@
|
|||
|
||||
namespace guecs {
|
||||
|
||||
Clickable make_action(GameLevel& target, Events::GUI event) {
|
||||
return {[&, event](auto gui_id, auto data){
|
||||
// BUG: either get rid of gui_id or also send a reference the the $gui that is sending the event
|
||||
target.world->send<Events::GUI>(event, gui_id, data);
|
||||
Clickable make_action(GameLevel& target, guecs::Entity gui_id, Events::GUI event) {
|
||||
return {[&, gui_id, event](auto){
|
||||
target.world->send<Events::GUI>(event, gui_id, {});
|
||||
}};
|
||||
}
|
||||
|
||||
Clickable make_action(GameLevel& target, Events::GUI event, std::any data) {
|
||||
return {[&, event, data](auto gui_id, auto){
|
||||
Clickable make_action(GameLevel& target, guecs::Entity gui_id, Events::GUI event, std::any data) {
|
||||
return {[&, event, data](auto){
|
||||
target.world->send<Events::GUI>(event, gui_id, data);
|
||||
}};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue