summaryrefslogtreecommitdiff
path: root/src/gui/widgets/avatarlistbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-19 18:29:03 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-19 18:29:03 +0300
commit7b6b389fe156b8ff1fc1f35ee776a2e65f160921 (patch)
tree81e893b9e57ff483492df3dd4b645157a02173b3 /src/gui/widgets/avatarlistbox.cpp
parentf3fdd048e6265ab2c6e88ddff21dffd9409c03db (diff)
downloadManaVerse-7b6b389fe156b8ff1fc1f35ee776a2e65f160921.tar.gz
ManaVerse-7b6b389fe156b8ff1fc1f35ee776a2e65f160921.tar.bz2
ManaVerse-7b6b389fe156b8ff1fc1f35ee776a2e65f160921.tar.xz
ManaVerse-7b6b389fe156b8ff1fc1f35ee776a2e65f160921.zip
Move mapitemtype into separate file.
Diffstat (limited to 'src/gui/widgets/avatarlistbox.cpp')
-rw-r--r--src/gui/widgets/avatarlistbox.cpp19
1 files changed, 10 insertions, 9 deletions
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)