mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-12-16 01:48:56 +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:
@@ -464,7 +464,7 @@ class MenuBase : public ComponentBase {
|
||||
ConstStringListRef entries_;
|
||||
int* selected_;
|
||||
int selected_previous_ = *selected_;
|
||||
int selected_focus_= *selected_;
|
||||
int selected_focus_ = *selected_;
|
||||
Ref<MenuOption> option_;
|
||||
|
||||
std::vector<Box> boxes_;
|
||||
|
||||
Reference in New Issue
Block a user