diff options
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)); |