mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-28 16:29:34 +08:00
Feature: Dropdown options with callback (#826)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user