From ea84eba2562bfb87ecbc469000082d022b209505 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 9 Dec 2013 14:12:04 +0300 Subject: Add text colors for xp bar. New theme colors: XP_BAR, XP_BAR_OUTLINE --- data/graphics/gui/colors.xml | 2 ++ data/themes/blacknblack/colors.xml | 2 ++ data/themes/blackwood/colors.xml | 2 ++ data/themes/enchilado/colors.xml | 2 ++ data/themes/jewelry/colors.xml | 6 ++++++ data/themes/mana/colors.xml | 2 ++ data/themes/pink/colors.xml | 2 ++ data/themes/unity/colors.xml | 2 ++ data/themes/wood/colors.xml | 2 ++ src/gui/theme.cpp | 2 ++ src/gui/theme.h | 2 ++ src/gui/windows/ministatuswindow.cpp | 2 +- src/gui/windows/statuswindow.cpp | 2 ++ 13 files changed, 29 insertions(+), 1 deletion(-) diff --git a/data/graphics/gui/colors.xml b/data/graphics/gui/colors.xml index cf5a37fbf..b984cec3a 100644 --- a/data/graphics/gui/colors.xml +++ b/data/graphics/gui/colors.xml @@ -107,6 +107,8 @@ + + diff --git a/data/themes/blacknblack/colors.xml b/data/themes/blacknblack/colors.xml index 18879b319..70db41f5d 100644 --- a/data/themes/blacknblack/colors.xml +++ b/data/themes/blacknblack/colors.xml @@ -97,6 +97,8 @@ + + diff --git a/data/themes/blackwood/colors.xml b/data/themes/blackwood/colors.xml index 9d066891d..2285d70a6 100644 --- a/data/themes/blackwood/colors.xml +++ b/data/themes/blackwood/colors.xml @@ -96,6 +96,8 @@ + + diff --git a/data/themes/enchilado/colors.xml b/data/themes/enchilado/colors.xml index 821ca0f23..7c2735d74 100644 --- a/data/themes/enchilado/colors.xml +++ b/data/themes/enchilado/colors.xml @@ -97,6 +97,8 @@ + + diff --git a/data/themes/jewelry/colors.xml b/data/themes/jewelry/colors.xml index 587088a29..ef5f1312f 100644 --- a/data/themes/jewelry/colors.xml +++ b/data/themes/jewelry/colors.xml @@ -94,6 +94,8 @@ + + @@ -265,6 +267,8 @@ + + @@ -360,6 +364,8 @@ + + diff --git a/data/themes/mana/colors.xml b/data/themes/mana/colors.xml index b3140fdae..1461a116a 100644 --- a/data/themes/mana/colors.xml +++ b/data/themes/mana/colors.xml @@ -97,6 +97,8 @@ + + diff --git a/data/themes/pink/colors.xml b/data/themes/pink/colors.xml index af840806a..0faa08f83 100644 --- a/data/themes/pink/colors.xml +++ b/data/themes/pink/colors.xml @@ -97,6 +97,8 @@ + + diff --git a/data/themes/unity/colors.xml b/data/themes/unity/colors.xml index 8086ea7d5..f5c9279b1 100644 --- a/data/themes/unity/colors.xml +++ b/data/themes/unity/colors.xml @@ -96,6 +96,8 @@ + + diff --git a/data/themes/wood/colors.xml b/data/themes/wood/colors.xml index bba2e9cd6..346b82911 100644 --- a/data/themes/wood/colors.xml +++ b/data/themes/wood/colors.xml @@ -97,6 +97,8 @@ + + diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 5935442c0..aa0b87bcb 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -959,6 +959,8 @@ static int readColorType(const std::string &type) "MP_BAR_OUTLINE" "NO_MP_BAR", "NO_MP_BAR_OUTLINE" + "XP_BAR", + "XP_BAR_OUTLINE" }; if (type.empty()) diff --git a/src/gui/theme.h b/src/gui/theme.h index bd3db6f66..bbcce646f 100644 --- a/src/gui/theme.h +++ b/src/gui/theme.h @@ -402,6 +402,8 @@ class Theme final : public Palette, public ConfigListener MP_BAR_OUTLINE, NO_MP_BAR, NO_MP_BAR_OUTLINE, + XP_BAR, + XP_BAR_OUTLINE, THEME_COLORS_END }; diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp index 8186f1e04..be691b72e 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -71,7 +71,7 @@ MiniStatusWindow::MiniStatusWindow() : // TRANSLATORS: status bar name ? Theme::PROG_MP : Theme::PROG_NO_MP, "mp bar", _("mana bar")) : nullptr), - mXpBar(createBar(0, 100, 0, Theme::PROGRESS_BAR, Theme::PROG_EXP, + mXpBar(createBar(0, 100, 0, Theme::XP_BAR, Theme::PROG_EXP, // TRANSLATORS: status bar name "xp bar", _("experience bar"))), mJobBar(nullptr), diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index bf93efbee..2f3d5f1e0 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -199,6 +199,8 @@ StatusWindow::StatusWindow() : static_cast(PlayerInfo::getAttribute(PlayerInfo::EXP)) / static_cast(max): static_cast(0), 80, 0, Theme::PROG_EXP); + mXpBar->setColor(Theme::getThemeColor(Theme::XP_BAR), + Theme::getThemeColor(Theme::XP_BAR_OUTLINE)); const bool magicBar = Net::getGameHandler()->canUseMagicBar(); const int job = Net::getPlayerHandler()->getJobLocation() -- cgit v1.2.3-60-g2f50