#include <memory>
#include <string>
int main() {
int angle = 180.f;
float start = 0.f;
float end = 1.f;
std::string slider_angle_text;
std::string slider_start_text;
std::string slider_end_text;
auto slider_angle =
Slider(&slider_angle_text, &angle, 0, 360);
auto slider_start =
Slider(&slider_start_text, &start, 0.f, 1.f, 0.05f);
auto slider_end =
Slider(&slider_end_text, &end, 0.f, 1.f, 0.05f);
slider_angle,
slider_start,
slider_end,
});
slider_start_text =
"start = " +
std::to_string(
int(start * 100)) +
"%";
.Angle(angle)
layout->Render(),
}) |
});
screen.Loop(renderer);
}
static ScreenInteractive Fullscreen()
Component Vertical(Components children)
A list of components, drawn one by one vertically and navigated vertically using up/down arrow key or...
Decorator bgcolor(Color)
Decorate using a background color.
Element flex(Element)
Make a child element to expand proportionally to the space left in a container.
Component Renderer(Component child, std::function< Element()>)
Return a new Component, similar to |child|, but using |render| as the Component::Render() event.
Element center(Element)
Center an element horizontally and vertically.
std::string to_string(const std::wstring &s)
Convert a UTF8 std::string into a std::wstring.
Element text(std::wstring text)
Display a piece of unicode text.
Component Slider(SliderOption< T > options)
A slider in any direction.
Element vbox(Elements)
A container displaying elements vertically one by one.