Add SliderWithCallback component (#938)

Add SliderOption::on_change.

Useful to observe a change to the value.

Signed-off-by: Mikołaj Lubiak <lubiak@proton.me>
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
Mikołaj Lubiak
2024-10-29 08:03:59 +01:00
committed by GitHub
parent 1d40687a40
commit 99df1ac8ba
4 changed files with 90 additions and 47 deletions

View File

@@ -228,6 +228,7 @@ struct SliderOption {
Direction direction = Direction::Right;
Color color_active = Color::White;
Color color_inactive = Color::GrayDark;
std::function<void()> on_change; ///> Called when `value` is updated.
};
// Parameter pack used by `WindowOptions::render`.