Specify default state of 'Dragging' for Slider. Add Slider::Dragging and Slider::SetDragging
This commit is contained in:
@@ -40,7 +40,7 @@ namespace JUI
|
||||
[[nodiscard]] float CurrentValue() const;
|
||||
[[nodiscard]] Color4 ScrubberColor() const;
|
||||
[[nodiscard]] float ScrubberWidth() const;
|
||||
|
||||
[[nodiscard]] bool Dragging() const;
|
||||
[[nodiscard]] float Range() const;
|
||||
|
||||
void Minimum(float min);
|
||||
@@ -49,6 +49,8 @@ namespace JUI
|
||||
void CurrentValue(float value);
|
||||
void ScrubberColor(const Color4& color);
|
||||
void ScrubberWidth(float width);
|
||||
void SetDragging(bool value);
|
||||
|
||||
|
||||
|
||||
void OnClick(const J3ML::LinearAlgebra::Vector2 &MousePos, const JUI::MouseButton &MouseButton) override;
|
||||
@@ -63,7 +65,7 @@ namespace JUI
|
||||
float maximum = 1;
|
||||
float interval = 0.1;
|
||||
float current;
|
||||
bool dragging;
|
||||
bool dragging = false;
|
||||
float scrubber_width = 20;
|
||||
Color4 scrubber_color = Colors::White;
|
||||
private:
|
||||
|
@@ -119,4 +119,10 @@ namespace JUI
|
||||
Slider::Slider() {
|
||||
Name("Slider");
|
||||
}
|
||||
|
||||
void Slider::SetDragging(bool value) {
|
||||
dragging = value;
|
||||
}
|
||||
|
||||
bool Slider::Dragging() const { return dragging; }
|
||||
}
|
Reference in New Issue
Block a user