#include <array>
#include <cmath>
#include <memory>
int main() {
std::array<int, 30> values;
for (int i = 0; i < values.size(); ++i) {
values[i] = 50 + 20 * std::sin(i * 0.3);
}
for (auto& value : values) {
SliderOption<int> option;
option.value = &value;
option.max = 100;
option.increment = 5;
layout_horizontal->Add(Slider<int>(option));
}
screen.Loop(layout_horizontal);
}
static ScreenInteractive TerminalOutput()
Component Horizontal(Components children)
A list of components, drawn one by one horizontally and navigated horizontally using left/right arrow...
Decorator size(WidthOrHeight, Constraint, int value)
Apply a constraint on the size of an element.