FTXUI/examples/component/slider.cpp

19 lines
615 B
C++
Raw Normal View History

2021-05-10 02:32:27 +08:00
#include <memory> // for allocator
2021-05-02 02:40:35 +08:00
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(int argc, const char* argv[]) {
auto screen = ScreenInteractive::TerminalOutput();
2021-05-10 02:32:27 +08:00
int value = 50;
auto slider = Slider(L"Value:", &value, 0, 100, 1);
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.