#include <iostream>
#include <memory>
#include <string>
return option;
}
auto screen = ScreenInteractive::TerminalOutput();
int selected = 0;
auto menu = Container::Vertical(
{
MenuEntry(
" 1. rear",
Colored(Color::Red)),
MenuEntry(
" 2. drown",
Colored(Color::Yellow)),
MenuEntry(
" 3. nail",
Colored(Color::Green)),
MenuEntry(
" 4. quit",
Colored(Color::Cyan)),
MenuEntry(
" 5. decorative",
Colored(Color::Blue)),
MenuEntry(" 7. costume"),
MenuEntry(" 8. pick"),
MenuEntry(" 9. oral"),
MenuEntry("11. minister"),
MenuEntry("12. football"),
MenuEntry("13. welcome"),
MenuEntry("14. copper"),
MenuEntry("15. inhabitant"),
},
&selected);
auto renderer = Renderer(menu, [&] {
hbox(text(
"selected = "), text(std::to_string(selected))),
separator(),
menu->Render() | frame,
}) |
border | bgcolor(Color::Black);
});
std::cout << "Selected element = " << selected << std::endl;
}
AnimatedColorsOption animated_colors
Element vbox(Elements children)
Un contenedor que muestra elementos verticalmente uno por uno.
Color es una clase que representa un color en la interfaz de usuario de la terminal.
return hbox({ text(std::to_string(int(progress *100))+"% ")|size(WIDTH, EQUAL, 5), gauge(progress), })
El espacio de nombres ftxui:: de FTXUI.
AnimatedColorOption foreground
AnimatedColorOption background