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
|
@ -21,8 +21,8 @@ namespace gui {
|
|||
auto area = gui.entity(name);
|
||||
|
||||
gui.set<Clickable>(area, {
|
||||
[&](auto ent, auto data) {
|
||||
level.world->send<Events::GUI>(Events::GUI::AIM_CLICK, ent, data);
|
||||
[&](auto) {
|
||||
level.world->send<Events::GUI>(Events::GUI::AIM_CLICK, area, {});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue