diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-07-26 20:07:20 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-07-26 20:07:20 +0000 |
commit | 1c43b2cdee5a5508a6e771b477100517deae07e7 (patch) | |
tree | 5a5df16ea526daed5b8268f26d4e63c76017dec4 /src/gui/minimap.cpp | |
parent | ea17e8e26173d641fc9b3710b65209c03af5aff3 (diff) | |
download | mana-1c43b2cdee5a5508a6e771b477100517deae07e7.tar.gz mana-1c43b2cdee5a5508a6e771b477100517deae07e7.tar.bz2 mana-1c43b2cdee5a5508a6e771b477100517deae07e7.tar.xz mana-1c43b2cdee5a5508a6e771b477100517deae07e7.zip |
Added Being::Type enumeration and type-aware findNode(). Fixed font not being reset after drawing speech. Target marker drawing moved into engine.
Diffstat (limited to 'src/gui/minimap.cpp')
-rw-r--r-- | src/gui/minimap.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index 98392adf..c733da42 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -91,18 +91,21 @@ void Minimap::draw(gcn::Graphics *graphics) being->x / 2 + getPadding() - 1, being->y / 2 + getTitleBarHeight() - 1, 3, 3)); } - else if (being->isPlayer()) + else { - // Other player dot - graphics->setColor(gcn::Color(61, 52, 209)); - graphics->fillRectangle(gcn::Rectangle( - being->x / 2 + getPadding(), - being->y / 2 + getTitleBarHeight(), 1, 1)); - } - else if (being->isMonster()) - { - // Enemy dot - graphics->setColor(gcn::Color(209, 52, 61)); + switch (being->getType()) { + case Being::PLAYER: + graphics->setColor(gcn::Color(61, 52, 209)); + break; + + case Being::MONSTER: + graphics->setColor(gcn::Color(209, 52, 61)); + break; + + default: + break; + } + graphics->fillRectangle(gcn::Rectangle( being->x / 2 + getPadding(), being->y / 2 + getTitleBarHeight(), 1, 1)); |