diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-04-21 05:25:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-04-21 05:25:01 +0300 |
commit | 8037d33c9f429d4c0322da383cdda46776c3c14e (patch) | |
tree | 7460a6dd0c774817ff1dd92aa190776ae1684ed9 /src/gui/widgets/avatarlistbox.cpp | |
parent | d7eae524bf7e88ebb5a324431b74a77ce1e7fded (diff) | |
download | plus-8037d33c9f429d4c0322da383cdda46776c3c14e.tar.gz plus-8037d33c9f429d4c0322da383cdda46776c3c14e.tar.bz2 plus-8037d33c9f429d4c0322da383cdda46776c3c14e.tar.xz plus-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.cpp | 25 |
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(); |