14 virtual void Create()
override;
16 virtual void Tick(
float deltaTime)
override;
19 void SetValue(
float value);
20 float GetValue()
const;
21 void SetMinValue(
float minValue);
22 float GetMinValue()
const;
23 void SetMaxValue(
float maxValue);
24 float GetMaxValue()
const;
25 void SetStep(
float step);
26 float GetStep()
const;
27 void SetRange(
float minValue,
float maxValue);
29 void SetBackgroundTexture(
Texture* texture);
30 Texture* GetBackgroundTexture();
31 void SetGrabberTexture(
Texture* texture);
34 void SetBackgroundColor(glm::vec4 color);
35 glm::vec4 GetBackgroundColor();
36 void SetGrabberColor(glm::vec4 color);
37 glm::vec4 GetGrabberColor();
38 void SetGrabberHoveredColor(glm::vec4 color);
39 glm::vec4 GetGrabberHoveredColor();
40 void SetGrabberPressedColor(glm::vec4 color);
41 glm::vec4 GetGrabberPressedColor();
43 void SetGrabberWidth(
float width);
44 float GetGrabberWidth()
const;
45 void SetTrackHeight(
float height);
46 float GetTrackHeight()
const;
48 bool IsDragging()
const;
50 Quad* GetBackground();
57 void UpdateAppearance();
58 void UpdateGrabberPosition();
59 float GetValueFromPosition(
float x);
60 float GetValueRatio()
const;
61 float SnapToStep(
float value);
65 float mMinValue = 0.0f;
66 float mMaxValue = 1.0f;
72 glm::vec4 mBackgroundColor = { 0.3f, 0.3f, 0.3f, 1.0f };
73 glm::vec4 mGrabberColor = { 0.7f, 0.7f, 0.7f, 1.0f };
74 glm::vec4 mGrabberHoveredColor = { 0.8f, 0.8f, 0.8f, 1.0f };
75 glm::vec4 mGrabberPressedColor = { 0.6f, 0.6f, 0.6f, 1.0f };
76 float mGrabberWidth = 20.0f;
77 float mTrackHeight = 8.0f;
80 bool mDragging =
false;
81 bool mGrabberHovered =
false;
84 Quad* mBackground =
nullptr;