summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-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();