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 GitHub
parent 2216f3a5da
commit 3c9fa60d28
9 changed files with 202 additions and 56 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;
}