summaryrefslogtreecommitdiff
path: root/plugingui/slider.h
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2018-06-08 01:18:02 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2018-06-08 01:19:19 +0200
commit8f3f22bb5d9d6879bb21d0132a3e0d0af4cd5380 (patch)
treeb3aab48cde087b07d0152b5b6945c3eea305a6ad /plugingui/slider.h
parentf532587d5c3576dc04d4c6eeee20c5dcdf642244 (diff)
Disable bleed control frame if drumkit doesn't support it.
Diffstat (limited to 'plugingui/slider.h')
-rw-r--r--plugingui/slider.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugingui/slider.h b/plugingui/slider.h
index 4480508..c12144d 100644
--- a/plugingui/slider.h
+++ b/plugingui/slider.h
@@ -56,6 +56,7 @@ public:
enum class Colour { Green, Red, Blue, Yellow, Purple, Grey };
// Changes the colour of the inner bar
void setColour(Colour colour);
+ void setEnabled(bool enabled);
Notifier<> clickNotifier;
Notifier<float> valueChangedNotifier; // (float value)
@@ -66,6 +67,8 @@ protected:
virtual void mouseMoveEvent(MouseMoveEvent* mouseMoveEvent) override;
virtual void scrollEvent(ScrollEvent* scrollEvent) override;
+ bool enabled = true;;
+
private:
enum class State
{
@@ -123,6 +126,7 @@ private:
// This points to the inner_bar_* of the current color.
// It should never be a nullptr!
TexturedBox* inner_bar{&inner_bar_blue};
+ TexturedBox* active_inner_bar = inner_bar;
std::size_t bar_boundary{5};
std::size_t button_offset{7};