Feature: Dropdown options with callback (#826)

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
James
2024-04-06 16:45:10 +01:00
committed by ArthurSonzogni
parent d8617ec2b6
commit 3b6e0d5a38
9 changed files with 201 additions and 52 deletions

View File

@@ -104,7 +104,7 @@ class ButtonBase : public ComponentBase, public ButtonOption {
// TODO(arthursonzogni): Consider posting the task to the main loop, instead
// of invoking it immediately.
on_click(); // May delete this.
on_click(); // May delete this.
}
bool OnEvent(Event event) override {
@@ -113,7 +113,7 @@ class ButtonBase : public ComponentBase, public ButtonOption {
}
if (event == Event::Return) {
OnClick(); // May delete this.
OnClick(); // May delete this.
return true;
}
return false;
@@ -130,7 +130,7 @@ class ButtonBase : public ComponentBase, public ButtonOption {
if (event.mouse().button == Mouse::Left &&
event.mouse().motion == Mouse::Pressed) {
TakeFocus();
OnClick(); // May delete this.
OnClick(); // May delete this.
return true;
}