summaryrefslogtreecommitdiff
path: root/src/gui/widgets/avatarlistbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-21 05:25:01 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-21 05:25:01 +0300
commit8037d33c9f429d4c0322da383cdda46776c3c14e (patch)
tree7460a6dd0c774817ff1dd92aa190776ae1684ed9 /src/gui/widgets/avatarlistbox.cpp
parentd7eae524bf7e88ebb5a324431b74a77ce1e7fded (diff)
downloadmv-8037d33c9f429d4c0322da383cdda46776c3c14e.tar.gz
mv-8037d33c9f429d4c0322da383cdda46776c3c14e.tar.bz2
mv-8037d33c9f429d4c0322da383cdda46776c3c14e.tar.xz
mv-8037d33c9f429d4c0322da383cdda46776c3c14e.zip
Impliment attack filter.
Add tab in social tab.
Diffstat (limited to 'src/gui/widgets/avatarlistbox.cpp')
-rw-r--r--src/gui/widgets/avatarlistbox.cpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index c1458d3fd..8309ad156 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -114,10 +114,13 @@ void AvatarListBox::draw(gcn::Graphics *gcnGraphics)
if (!a)
continue;
- // Draw online status
- Image *icon = a->getOnline() ? onlineIcon : offlineIcon;
- if (icon)
- graphics->drawImage(icon, 2, y + 1);
+ if (a->getType() != MapItem::SEPARATOR)
+ {
+ // Draw online status
+ Image *icon = a->getOnline() ? onlineIcon : offlineIcon;
+ if (icon)
+ graphics->drawImage(icon, 2, y + 1);
+ }
if (a->getDisplayBold())
graphics->setFont(boldFont);
@@ -316,6 +319,20 @@ void AvatarListBox::mousePressed(gcn::MouseEvent &event)
model->getAvatarAt(selected)->getName());
}
}
+ else if (ava->getType() == MapItem::MONSTER)
+ {
+ if (model->getAvatarAt(selected)->getLevel() == 0)
+ {
+ viewport->showAttackMonsterPopup("",
+ model->getAvatarAt(selected)->getOnline());
+ }
+ else
+ {
+ viewport->showAttackMonsterPopup(
+ model->getAvatarAt(selected)->getName(),
+ model->getAvatarAt(selected)->getOnline());
+ }
+ }
else
{
Map *map = viewport->getMap();