mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-16 08:04:21 +08:00
Use vscroll_indicator in examples.
This commit is contained in:

committed by
Arthur Sonzogni

parent
535974d291
commit
84287eb217
@@ -24,7 +24,8 @@ int main(int argc, const char* argv[]) {
|
||||
}
|
||||
|
||||
auto renderer = Renderer(container, [&] {
|
||||
return container->Render() | frame | size(HEIGHT, LESS_THAN, 10) | border;
|
||||
return container->Render() | vscroll_indicator | frame |
|
||||
size(HEIGHT, LESS_THAN, 10) | border;
|
||||
});
|
||||
|
||||
auto screen = ScreenInteractive::FitComponent();
|
||||
|
@@ -214,23 +214,25 @@ int main(int argc, const char* argv[]) {
|
||||
};
|
||||
|
||||
auto compiler_renderer = Renderer(compiler_component, [&] {
|
||||
auto compiler_win = window(text("Compiler"), compiler->Render() | frame);
|
||||
auto flags_win = window(text("Flags"), flags->Render() | frame);
|
||||
auto compiler_win = window(text("Compiler"),
|
||||
compiler->Render() | vscroll_indicator | frame);
|
||||
auto flags_win =
|
||||
window(text("Flags"), flags->Render() | vscroll_indicator | frame);
|
||||
auto executable_win = window(text("Executable:"), executable_->Render());
|
||||
auto input_win =
|
||||
window(text("Input"),
|
||||
hbox({
|
||||
vbox({
|
||||
hbox({
|
||||
text("Add: "),
|
||||
input_add->Render(),
|
||||
}) | size(WIDTH, EQUAL, 20) |
|
||||
size(HEIGHT, EQUAL, 1),
|
||||
filler(),
|
||||
}),
|
||||
separator(),
|
||||
input->Render() | frame | size(HEIGHT, EQUAL, 3) | flex,
|
||||
}));
|
||||
window(text("Input"), hbox({
|
||||
vbox({
|
||||
hbox({
|
||||
text("Add: "),
|
||||
input_add->Render(),
|
||||
}) | size(WIDTH, EQUAL, 20) |
|
||||
size(HEIGHT, EQUAL, 1),
|
||||
filler(),
|
||||
}),
|
||||
separator(),
|
||||
input->Render() | vscroll_indicator | frame |
|
||||
size(HEIGHT, EQUAL, 3) | flex,
|
||||
}));
|
||||
return vbox({
|
||||
hbox({
|
||||
compiler_win,
|
||||
@@ -240,7 +242,7 @@ int main(int argc, const char* argv[]) {
|
||||
input_win | size(WIDTH, EQUAL, 60),
|
||||
}),
|
||||
filler(),
|
||||
}) | size(HEIGHT, LESS_THAN, 6),
|
||||
}) | size(HEIGHT, LESS_THAN, 8),
|
||||
hflow(render_command()) | flex_grow,
|
||||
}) |
|
||||
flex_grow | border;
|
||||
|
@@ -18,7 +18,8 @@ int main(int argc, const char* argv[]) {
|
||||
entries.push_back("Entry " + std::to_string(i));
|
||||
auto radiobox = Menu(&entries, &selected);
|
||||
auto renderer = Renderer(radiobox, [&] {
|
||||
return radiobox->Render() | frame | size(HEIGHT, LESS_THAN, 10) | border;
|
||||
return radiobox->Render() | vscroll_indicator | frame |
|
||||
size(HEIGHT, LESS_THAN, 10) | border;
|
||||
});
|
||||
|
||||
auto screen = ScreenInteractive::FitComponent();
|
||||
|
@@ -18,7 +18,8 @@ int main(int argc, const char* argv[]) {
|
||||
entries.push_back("RadioBox " + std::to_string(i));
|
||||
auto radiobox = Radiobox(&entries, &selected);
|
||||
auto renderer = Renderer(radiobox, [&] {
|
||||
return radiobox->Render() | frame | size(HEIGHT, LESS_THAN, 10) | border;
|
||||
return radiobox->Render() | vscroll_indicator | frame |
|
||||
size(HEIGHT, LESS_THAN, 10) | border;
|
||||
});
|
||||
|
||||
auto screen = ScreenInteractive::FitComponent();
|
||||
|
Reference in New Issue
Block a user