#include <functional>
#include <memory>
#include <string>
#include <vector>
int main(int argc, const char* argv[]) {
std::vector<std::string> entries = {
"Monkey", "Dog", "Cat", "Bird", "Elephant",
};
int menu_1_selected_ = 0;
int menu_2_selected_ = 0;
int menu_3_selected_ = 0;
int menu_4_selected_ = 0;
int menu_5_selected_ = 0;
int menu_6_selected_ = 0;
option_1.
on_enter = screen.ExitLoopClosure();
auto menu_1_ =
Menu(&entries, &menu_1_selected_, &option_1);
option_2.
on_enter = screen.ExitLoopClosure();
auto menu_2_ =
Menu(&entries, &menu_2_selected_, &option_2);
option_3.
on_enter = screen.ExitLoopClosure();
auto menu_3_ =
Menu(&entries, &menu_3_selected_, &option_3);
option_4.
on_enter = screen.ExitLoopClosure();
auto menu_4_ =
Menu(&entries, &menu_4_selected_, &option_4);
option_5.
on_enter = screen.ExitLoopClosure();
auto menu_5_ =
Menu(&entries, &menu_5_selected_, &option_5);
option_6.
on_enter = screen.ExitLoopClosure();
auto menu_6_ =
Menu(&entries, &menu_6_selected_, &option_6);
menu_1_,
menu_2_,
menu_3_,
menu_4_,
menu_5_,
menu_6_,
});
auto renderer =
Renderer(container, [&] {
return
menu_6_->Render() |
flex,
});
screen.Loop(renderer);
}