FTXUI/examples/component/slider.cpp

17 lines
549 B
C++
Raw Normal View History

2021-05-10 02:32:27 +08:00
#include "ftxui/component/captured_mouse.hpp" // for ftxui
#include "ftxui/component/component.hpp" // for Slider
2021-05-02 02:40:35 +08:00
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
2021-04-29 06:18:58 +08:00
using namespace ftxui;
int main() {
2021-04-29 06:18:58 +08:00
auto screen = ScreenInteractive::TerminalOutput();
2021-05-10 02:32:27 +08:00
int value = 50;
auto slider = Slider("Value:", &value, 0, 100, 1);
2021-05-10 02:32:27 +08:00
screen.Loop(slider);
2021-04-29 06:18:58 +08:00
}
// Copyright 2020 Arthur Sonzogni. All rights reserved.
// Use of this source code is governed by the MIT license that can be found in
// the LICENSE file.