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:
Arthur Sonzogni
2022-08-30 18:52:33 +02:00
committed by GitHub
parent 8226c5aea7
commit b3ba747d82
19 changed files with 452 additions and 77 deletions

View File

@@ -55,7 +55,7 @@ void UpdatePixelStyle(std::stringstream& ss,
if (next == previous) {
return;
}
if ((!next.bold && previous.bold) || //
(!next.dim && previous.dim)) {
ss << "\x1B[22m"; // BOLD_RESET and DIM_RESET