Removed hover on guecs::UI::mouse and now use a generic 16 bit modifier bitset. Also finally fixed Clickable so it just a simple callback with only the modifiers.

This commit is contained in:
Zed A. Shaw 2025-08-14 12:35:25 -04:00
parent 4c019048d0
commit 5d0d8b16fc
5 changed files with 29 additions and 41 deletions

View file

@ -169,8 +169,8 @@ struct CalculatorUI {
$gui.set<guecs::Text>(id, { label });
wchar_t op = label[0];
$gui.set<guecs::Clickable>(id, {
[&, op](auto, auto) { handle_button(op); }
});
[&, op](auto) { handle_button(op); }
});
}
}
@ -182,8 +182,8 @@ struct CalculatorUI {
// $gui.debug_layout(window);
}
void mouse(float x, float y, bool hover) {
$gui.mouse(x, y, hover);
void mouse(float x, float y, guecs::Modifiers mods) {
$gui.mouse(x, y, mods);
}
void handle_button(wchar_t op) {