#include <functional>
#include <iostream>
#include <string>
#include <vector>
int main() {
auto screen = ScreenInteractive::TerminalOutput();
std::vector<std::string> entries = {
"entry 1",
"entry 2",
"entry 3",
};
int selected = 0;
option.
on_enter = screen.ExitLoopClosure();
auto menu =
Menu(&entries, &selected, option);
screen.Loop(menu);
std::cout << "Selected element = " << selected << std::endl;
}
Component Menu(MenuOption options)
A list of text. The focused element is selected.