diff options
author | André Nusser <andre.nusser@googlemail.com> | 2017-04-21 08:55:00 +0200 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2017-04-21 08:55:00 +0200 |
commit | 07b5f422e7d5172992127feca05a1cf1a551dab5 (patch) | |
tree | 8c247c3c3b77b806e5d22c0ad4bba9ff7bf5b037 /plugingui/slider.h | |
parent | 46e70f2177976c3a9fe31b4a9ff28d47b018ca3b (diff) |
Change the slider color to grey when "unlimited".
Included a new slider texture for that.
Diffstat (limited to 'plugingui/slider.h')
-rw-r--r-- | plugingui/slider.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/plugingui/slider.h b/plugingui/slider.h index 1543d6f..4480508 100644 --- a/plugingui/slider.h +++ b/plugingui/slider.h @@ -53,7 +53,7 @@ public: void setValue(float new_value); float value() const; - enum class Colour { Green, Red, Blue }; + enum class Colour { Green, Red, Blue, Yellow, Purple, Grey }; // Changes the colour of the inner bar void setColour(Colour colour); @@ -84,6 +84,11 @@ private: 7, 1, 7, // dx1, dx2, dx3 7, 1, 7 // dy1, dy2, dy3 }; + Texture button{ + getImageCache(), ":resources/slider.png", 15, 0, // atlas offset (x, y) + 15, 15 // width, height + }; + TexturedBox inner_bar_green{getImageCache(), ":resources/slider.png", 30, 0, // atlas offset (x, y) 2, 1, 2, // dx1, dx2, dx3 @@ -99,10 +104,20 @@ private: 2, 1, 2, // dx1, dx2, dx3 2, 1, 2 // dy1, dy2, dy3 }; - - Texture button{ - getImageCache(), ":resources/slider.png", 15, 0, // atlas offset (x, y) - 15, 15 // width, height + TexturedBox inner_bar_yellow{getImageCache(), ":resources/slider.png", + 35, 0, // atlas offset (x, y) + 2, 1, 2, // dx1, dx2, dx3 + 2, 1, 2 // dy1, dy2, dy3 + }; + TexturedBox inner_bar_purple{getImageCache(), ":resources/slider.png", + 35, 5, // atlas offset (x, y) + 2, 1, 2, // dx1, dx2, dx3 + 2, 1, 2 // dy1, dy2, dy3 + }; + TexturedBox inner_bar_grey{getImageCache(), ":resources/slider.png", + 35, 10, // atlas offset (x, y) + 2, 1, 2, // dx1, dx2, dx3 + 2, 1, 2 // dy1, dy2, dy3 }; // This points to the inner_bar_* of the current color. |