mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-24 14:51:09 +08:00
Introduce Options and use them for Menu.
Introduce Options for components. This allows me to add new features, without updating functions signatures.
This commit is contained in:

committed by
Arthur Sonzogni

parent
82adc3b410
commit
cd84b187b3
@@ -19,8 +19,9 @@ int main(int argc, const char* argv[]) {
|
||||
};
|
||||
int selected = 0;
|
||||
|
||||
auto menu = Menu(&entries, &selected);
|
||||
MenuBase::From(menu)->on_enter = screen.ExitLoopClosure();
|
||||
MenuOption option;
|
||||
option.on_enter = screen.ExitLoopClosure();
|
||||
auto menu = Menu(&entries, &selected, &option);
|
||||
|
||||
screen.Loop(menu);
|
||||
|
||||
|
Reference in New Issue
Block a user