Going into a well triggers a little 'loading screen' that's currently faked. Click on it to continue.
This commit is contained in:
parent
9d49c6a30b
commit
e9accf14e6
8 changed files with 35 additions and 6 deletions
|
@ -98,7 +98,9 @@ namespace guecs {
|
|||
});
|
||||
}
|
||||
|
||||
void UI::mouse(float x, float y) {
|
||||
bool UI::mouse(float x, float y) {
|
||||
int action_count = 0;
|
||||
|
||||
$world.query<lel::Cell, Clickable>([&](auto ent, auto& cell, auto &clicked) {
|
||||
if((x >= cell.x && x <= cell.x + cell.w) &&
|
||||
(y >= cell.y && y <= cell.y + cell.h))
|
||||
|
@ -108,8 +110,12 @@ namespace guecs {
|
|||
} else {
|
||||
clicked.action(ent, {});
|
||||
}
|
||||
|
||||
action_count++;
|
||||
}
|
||||
});
|
||||
|
||||
return action_count > 0;
|
||||
}
|
||||
|
||||
Clickable make_action(DinkyECS::World& target, Events::GUI event) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue