diff options
author | André Nusser <andre.nusser@googlemail.com> | 2018-06-07 23:30:40 +0200 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2018-06-07 23:30:40 +0200 |
commit | 7c50c15ede76869489a94503fa22028180f41cff (patch) | |
tree | 26c15ebec97f3ab16168b7d2b1be5452bab6c897 /plugingui/powerbutton.h | |
parent | 887dde747142ed340c3608e98a36b5e0d88c5d93 (diff) |
Add disabled visualization to powerbutton.
Diffstat (limited to 'plugingui/powerbutton.h')
-rw-r--r-- | plugingui/powerbutton.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugingui/powerbutton.h b/plugingui/powerbutton.h index 53f8d88..14dbeca 100644 --- a/plugingui/powerbutton.h +++ b/plugingui/powerbutton.h @@ -38,15 +38,21 @@ public: PowerButton(Widget* parent); virtual ~PowerButton() = default; + void setEnabled(bool enabled); + protected: // From Widget: virtual void repaintEvent(RepaintEvent* repaintEvent) override; + bool enabled = true; + private: Texture on{getImageCache(), ":resources/bypass_button.png", 32, 0, 16, 16}; Texture on_clicked{getImageCache(), ":resources/bypass_button.png", 48, 0, 16, 16}; Texture off{getImageCache(), ":resources/bypass_button.png", 0, 0, 16, 16}; Texture off_clicked{getImageCache(), ":resources/bypass_button.png", 16, 0, 16, 16}; + Texture disabled{getImageCache(), ":resources/bypass_button.png", 64, 0, 16, 16}; + Texture disabled_clicked{getImageCache(), ":resources/bypass_button.png", 80, 0, 16, 16}; }; } // GUI:: |