summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-03 21:28:50 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-03 21:28:50 +0300
commitbbc361c48389875a8a67d138bc05aad30070b916 (patch)
tree8d2fcdf36e953b54904357b0a14a76bb469c2337 /src
parent54a54eb5317650fc3306d200517bcc48bb7f1d9c (diff)
downloadmv-bbc361c48389875a8a67d138bc05aad30070b916.tar.gz
mv-bbc361c48389875a8a67d138bc05aad30070b916.tar.bz2
mv-bbc361c48389875a8a67d138bc05aad30070b916.tar.xz
mv-bbc361c48389875a8a67d138bc05aad30070b916.zip
add UPDATE color into progress bar colors.
New progress color: UPDATE. also removed DEFAULT progress color.
Diffstat (limited to 'src')
-rw-r--r--src/gui/theme.cpp4
-rw-r--r--src/gui/theme.h4
-rw-r--r--src/gui/widgets/progressbar.cpp6
-rw-r--r--src/gui/widgets/progressbar.h4
-rw-r--r--src/gui/windows/updaterwindow.cpp2
5 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 95e35f2aa..fa5ec0e04 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -1031,14 +1031,14 @@ static int readProgressType(const std::string &type)
{
static const std::string colors[] =
{
- "DEFAULT",
"HP",
"MP",
"NO_MP",
"EXP",
"INVY_SLOTS",
"WEIGHT",
- "JOB"
+ "JOB",
+ "UPDATE"
};
if (type.empty())
diff --git a/src/gui/theme.h b/src/gui/theme.h
index bbc6ae06f..31dc0ee60 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -398,14 +398,14 @@ class Theme final : public Palette, public ConfigListener
enum ProgressPalette
{
- PROG_DEFAULT = 0,
- PROG_HP,
+ PROG_HP = 0,
PROG_MP,
PROG_NO_MP,
PROG_EXP,
PROG_INVY_SLOTS,
PROG_WEIGHT,
PROG_JOB,
+ PROG_UPDATE,
THEME_PROG_END
};
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index de30feeef..51faed2ae 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -37,19 +37,19 @@ float ProgressBar::mAlpha = 1.0;
ProgressBar::ProgressBar(const Widget2 *const widget, float progress,
const int width, const int height,
- const int color):
+ const int backColor):
gcn::Widget(),
Widget2(widget),
gcn::WidgetListener(),
mSkin(nullptr),
mProgress(progress),
mProgressToGo(progress),
- mColor(Theme::getProgressColor(color >= 0 ? color : 0, mProgress)),
+ mColor(Theme::getProgressColor(backColor >= 0 ? backColor : 0, mProgress)),
mColorToGo(mColor),
mOutlineColor(getThemeColor(Theme::OUTLINE)),
mText(),
mVertexes(new ImageCollection),
- mProgressPalette(color),
+ mProgressPalette(backColor),
mPadding(2),
mFillPadding(3),
mSmoothProgress(true),
diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h
index fa05e7bd3..160d3f4a2 100644
--- a/src/gui/widgets/progressbar.h
+++ b/src/gui/widgets/progressbar.h
@@ -50,8 +50,8 @@ class ProgressBar final : public gcn::Widget,
* Constructor, initializes the progress with the given value.
*/
ProgressBar(const Widget2 *const widget, float progress,
- const int width = 40, const int height = 7,
- const int color = -1);
+ const int width, const int height,
+ const int backColor);
A_DELETE_COPY(ProgressBar)
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index d381e11c2..9c9a3adab 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -179,7 +179,7 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost,
mCancelButton(new Button(this, _("Cancel"), "cancel", this)),
// TRANSLATORS: updater window button
mPlayButton(new Button(this, _("Play"), "play", this)),
- mProgressBar(new ProgressBar(this, 0.0, 310, 0)),
+ mProgressBar(new ProgressBar(this, 0.0, 310, 0, Theme::PROG_UPDATE)),
mBrowserBox(new BrowserBox(this, BrowserBox::AUTO_SIZE, true,
"browserbox.xml")),
mScrollArea(new ScrollArea(mBrowserBox, true, "update_background.xml")),