diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-06-08 19:14:37 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-06-08 19:14:37 +0200 |
commit | ecc9c4863cc89366950518bb51a6264a0369c49d (patch) | |
tree | 7418ec16862bead2d0034cb3364df1f9d5e63f09 /plugingui/progressbar.h | |
parent | cb51ef44e8f3b6461e608171eb3468bc15a696da (diff) |
Update all use of progress_*.png to new TexturedBox.
Diffstat (limited to 'plugingui/progressbar.h')
-rw-r--r-- | plugingui/progressbar.h | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/plugingui/progressbar.h b/plugingui/progressbar.h index 7485e40..9c651ef 100644 --- a/plugingui/progressbar.h +++ b/plugingui/progressbar.h @@ -30,8 +30,10 @@ #include "guievent.h" #include "painter.h" +#include "texturedbox.h" -namespace GUI { +namespace GUI +{ enum class ProgressBarState { @@ -41,7 +43,9 @@ enum class ProgressBarState Off }; -class ProgressBar : public Widget { +class ProgressBar + : public Widget +{ public: ProgressBar(Widget* parent); ~ProgressBar(); @@ -58,11 +62,25 @@ protected: private: ProgressBarState state{ProgressBarState::Blue}; - Painter::Bar bar_bg; + TexturedBox bar_bg{getImageCache(), ":progress.png", + 0, 0, // atlas offset (x, y) + 6, 1, 6, // dx1, dx2, dx3 + 11, 0, 0}; // dy1, dy2, dy3 + + TexturedBox bar_red{getImageCache(), ":progress.png", + 13, 0, // atlas offset (x, y) + 2, 1, 2, // dx1, dx2, dx3 + 11, 0, 0}; // dy1, dy2, dy3 + + TexturedBox bar_green{getImageCache(), ":progress.png", + 18, 0, // atlas offset (x, y) + 2, 1, 2, // dx1, dx2, dx3 + 11, 0, 0}; // dy1, dy2, dy3 - Painter::Bar bar_green; - Painter::Bar bar_blue; - Painter::Bar bar_red; + TexturedBox bar_blue{getImageCache(), ":progress.png", + 23, 0, // atlas offset (x, y) + 2, 1, 2, // dx1, dx2, dx3 + 11, 0, 0}; // dy1, dy2, dy3 std::size_t total{0}; std::size_t value{0}; |