summaryrefslogtreecommitdiff
path: root/plugingui
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui')
-rw-r--r--plugingui/diskstreamingframecontent.cc2
-rw-r--r--plugingui/resources/slider.pngbin1079 -> 1234 bytes
-rw-r--r--plugingui/slider.cc9
-rw-r--r--plugingui/slider.h25
4 files changed, 30 insertions, 6 deletions
diff --git a/plugingui/diskstreamingframecontent.cc b/plugingui/diskstreamingframecontent.cc
index 468cc7c..e423538 100644
--- a/plugingui/diskstreamingframecontent.cc
+++ b/plugingui/diskstreamingframecontent.cc
@@ -100,7 +100,7 @@ void DiskstreamingframeContent::limitSettingsValueChanged(std::size_t value)
}
else {
label_size.setText("Unlimited");
- slider.setColour(Slider::Colour::Green);
+ slider.setColour(Slider::Colour::Grey);
}
button.setEnabled(true);
diff --git a/plugingui/resources/slider.png b/plugingui/resources/slider.png
index 7a87d34..3766e83 100644
--- a/plugingui/resources/slider.png
+++ b/plugingui/resources/slider.png
Binary files differ
diff --git a/plugingui/slider.cc b/plugingui/slider.cc
index 41ffb01..bd28f81 100644
--- a/plugingui/slider.cc
+++ b/plugingui/slider.cc
@@ -76,6 +76,15 @@ void Slider::setColour(Colour colour)
case Colour::Blue:
inner_bar = &inner_bar_blue;
break;
+ case Colour::Yellow:
+ inner_bar = &inner_bar_yellow;
+ break;
+ case Colour::Purple:
+ inner_bar = &inner_bar_purple;
+ break;
+ case Colour::Grey:
+ inner_bar = &inner_bar_grey;
+ break;
}
}
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.