From 372f6493d07cbffb601ecb775ebecd51267725cf Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Fri, 27 Mar 2009 18:13:49 +0100 Subject: Gray out the magic bar when magic can't be used Restored code that probably got lost in a merge somewhere. Mantis-issue: 663 --- src/gui/status.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/gui/status.cpp b/src/gui/status.cpp index 2f95f1c8..e298c3e2 100644 --- a/src/gui/status.cpp +++ b/src/gui/status.cpp @@ -314,6 +314,10 @@ void StatusWindow::updateMPBar(ProgressBar *bar, bool showMax) else bar->setText(toString(player_node->mMp)); + if (player_node->MATK <= 0) + bar->setColor(100, 100, 100); // grey, to indicate that we lack magic + else + bar->setColor(143, 192, 211); // blue, to indicate that we have magic bar->setProgress((float) player_node->mMp / (float) player_node->mMaxMp); } -- cgit v1.2.3-70-g09d2