diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-12-22 15:23:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-12-22 15:23:28 +0300 |
commit | d7131239c18eafecef2e8b8fa6898ba9962ff0e8 (patch) | |
tree | f54629cc0e2616281957e24e18f27f9d33ceaa4b /src/gui/widgets | |
parent | 0dd6ab2bfdee4527ca0960b4e7a64e257bb93fa3 (diff) | |
download | manaplus-d7131239c18eafecef2e8b8fa6898ba9962ff0e8.tar.gz manaplus-d7131239c18eafecef2e8b8fa6898ba9962ff0e8.tar.bz2 manaplus-d7131239c18eafecef2e8b8fa6898ba9962ff0e8.tar.xz manaplus-d7131239c18eafecef2e8b8fa6898ba9962ff0e8.zip |
allow use different theme file for different progress bars.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/progressbar.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/progressbar.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp index 33011f9fc..e8f3b5947 100644 --- a/src/gui/widgets/progressbar.cpp +++ b/src/gui/widgets/progressbar.cpp @@ -37,7 +37,7 @@ float ProgressBar::mAlpha = 1.0; ProgressBar::ProgressBar(const Widget2 *const widget, float progress, const int width, const int height, - const int backColor): + const int backColor, const std::string &skin): gcn::Widget(), Widget2(widget), gcn::WidgetListener(), @@ -68,7 +68,7 @@ ProgressBar::ProgressBar(const Widget2 *const widget, float progress, Theme *const theme = Theme::instance(); if (theme) { - mSkin = theme->load("progressbar.xml", ""); + mSkin = theme->load(skin, "progressbar.xml"); if (mSkin) { setPadding(mSkin->getPadding()); diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h index 954d9f7d2..3bfceab18 100644 --- a/src/gui/widgets/progressbar.h +++ b/src/gui/widgets/progressbar.h @@ -51,7 +51,8 @@ class ProgressBar final : public gcn::Widget, */ ProgressBar(const Widget2 *const widget, float progress, const int width, const int height, - const int backColor); + const int backColor, + const std::string &skin); A_DELETE_COPY(ProgressBar) |