summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-27 18:13:49 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-27 18:13:49 +0100
commit372f6493d07cbffb601ecb775ebecd51267725cf (patch)
treebb5f273007f96d9bb73c2cccc2750844cc226b76 /src
parent1dcaa196fd8339dbdd28f9c09c62636b663a3846 (diff)
downloadmana-372f6493d07cbffb601ecb775ebecd51267725cf.tar.gz
mana-372f6493d07cbffb601ecb775ebecd51267725cf.tar.bz2
mana-372f6493d07cbffb601ecb775ebecd51267725cf.tar.xz
mana-372f6493d07cbffb601ecb775ebecd51267725cf.zip
Gray out the magic bar when magic can't be used
Restored code that probably got lost in a merge somewhere. Mantis-issue: 663
Diffstat (limited to 'src')
-rw-r--r--src/gui/status.cpp4
1 files changed, 4 insertions, 0 deletions
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);
}