summaryrefslogtreecommitdiff
path: root/src/gui/skilldialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/skilldialog.cpp')
-rw-r--r--src/gui/skilldialog.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index c1911ac5..49552421 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -134,24 +134,28 @@ public:
auto *model = static_cast<SkillModel *>(mListModel);
auto *graphics = static_cast<Graphics *>(gcnGraphics);
- const int alpha = gui->getTheme()->getGuiAlpha();
-
- graphics->setColor(Theme::getThemeColor(Theme::HIGHLIGHT, alpha));
graphics->setFont(getFont());
// Draw filled rectangle around the selected list element
if (mSelected >= 0)
{
+ auto highlightColor = Theme::getThemeColor(Theme::HIGHLIGHT);
+ highlightColor.a = gui->getTheme()->getGuiAlpha();
+ graphics->setColor(highlightColor);
graphics->fillRectangle(gcn::Rectangle(0, getRowHeight() * mSelected,
getWidth(), getRowHeight()));
}
// Draw the list elements
- graphics->setColor(Theme::getThemeColor(Theme::TEXT));
for (int i = 0, y = 1;
i < model->getNumberOfElements();
++i, y += getRowHeight())
{
+ if (mSelected == i)
+ graphics->setColor(Theme::getThemeColor(Theme::HIGHLIGHT_TEXT));
+ else
+ graphics->setColor(Theme::getThemeColor(Theme::TEXT));
+
if (SkillInfo *e = model->getSkillAt(i))
e->draw(graphics, y, getWidth());
}
@@ -290,7 +294,7 @@ void SkillDialog::loadSkills()
if (!root || root.name() != "skills")
{
- logger->log("Error loading skills file: %s", SKILLS_FILE);
+ Log::info("Error loading skills file: %s", SKILLS_FILE);
if (Net::getNetworkType() == ServerType::TmwAthena)
{