mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-28 16:29:34 +08:00
Feature: Slider in any directions. (#468)
Add the `SliderOption` option supporting: ```cpp { Ref<T> value; ConstRef<T> min = T(0); ConstRef<T> max = T(100); ConstRef<T> increment = (max() - min()) / 20; GaugeDirection direction = GaugeDirection::Right; Color color_active = Color::White; Color color_inactive = Color::GrayDark; }; ``` In particular, this supports multiple direction. This resolves: https://github.com/ArthurSonzogni/FTXUI/issues/467 This one do not support adding a label. The old constructors can still be used to have a label.
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
#include <functional> // for function
|
||||
#include <memory> // for shared_ptr
|
||||
#include <utility> // for move
|
||||
|
||||
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
|
||||
#include "ftxui/component/component.hpp" // for Make, Component, Checkbox
|
||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||
#include "ftxui/component/component_options.hpp" // for CheckboxOption
|
||||
#include "ftxui/component/component.hpp" // for Make, Checkbox
|
||||
#include "ftxui/component/component_base.hpp" // for Component, ComponentBase
|
||||
#include "ftxui/component/component_options.hpp" // for CheckboxOption, EntryState
|
||||
#include "ftxui/component/event.hpp" // for Event, Event::Return
|
||||
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Pressed
|
||||
#include "ftxui/dom/elements.hpp" // for operator|, text, Element, hbox, reflect, focus, nothing, select
|
||||
#include "ftxui/dom/elements.hpp" // for operator|, Element, reflect, focus, nothing, select
|
||||
#include "ftxui/screen/box.hpp" // for Box
|
||||
#include "ftxui/util/ref.hpp" // for Ref, ConstStringRef
|
||||
|
||||
|
Reference in New Issue
Block a user