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