From 7b6b389fe156b8ff1fc1f35ee776a2e65f160921 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 19 May 2014 18:29:03 +0300 Subject: Move mapitemtype into separate file. --- src/gui/widgets/avatarlistbox.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/gui/widgets/avatarlistbox.cpp') diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp index 4bbc85a94..41a190daa 100644 --- a/src/gui/widgets/avatarlistbox.cpp +++ b/src/gui/widgets/avatarlistbox.cpp @@ -38,6 +38,7 @@ #include "gui/windows/chatwindow.h" #include "resources/image.h" +#include "resources/mapitemtype.h" #include "resources/map/map.h" #include "resources/map/mapitem.h" @@ -128,7 +129,7 @@ void AvatarListBox::draw(Graphics *graphics) if (!a) continue; - if (a->getType() != MapItem::SEPARATOR) + if (a->getType() != MapItemType::SEPARATOR) { // Draw online status const Image *const icon = a->getOnline() @@ -286,7 +287,7 @@ void AvatarListBox::draw(Graphics *graphics) // Draw Name if (a->getDisplayBold()) { - if (a->getType() == MapItem::SEPARATOR) + if (a->getType() == MapItemType::SEPARATOR) { boldFont->drawString(graphics, text, mImagePadding + mPadding, y + mPadding); @@ -299,7 +300,7 @@ void AvatarListBox::draw(Graphics *graphics) } else { - if (a->getType() == MapItem::SEPARATOR) + if (a->getType() == MapItemType::SEPARATOR) { font->drawString(graphics, text, mImagePadding + mPadding, y + mPadding); @@ -363,7 +364,7 @@ void AvatarListBox::mousePressed(MouseEvent &event) switch (ava->getType()) { // AVATAR_PLAYER - case MapItem::EMPTY: + case MapItemType::EMPTY: { const Avatar *const avatar = model->getAvatarAt(selected); if (avatar) @@ -377,9 +378,9 @@ void AvatarListBox::mousePressed(MouseEvent &event) } break; } - case MapItem::ATTACK: - case MapItem::PRIORITY: - case MapItem::IGNORE_: + case MapItemType::ATTACK: + case MapItemType::PRIORITY: + case MapItemType::IGNORE_: { std::string name; if (model->getAvatarAt(selected)->getLevel() == 0) @@ -391,8 +392,8 @@ void AvatarListBox::mousePressed(MouseEvent &event) model->getAvatarAt(selected)->getType()); break; } - case MapItem::PICKUP: - case MapItem::NOPICKUP: + case MapItemType::PICKUP: + case MapItemType::NOPICKUP: { std::string name; if (model->getAvatarAt(selected)->getLevel() == 0) -- cgit v1.2.3-70-g09d2