예제 #1
0
 def __handleClickedNametag(self, avatar, playerId = None):
     self.notify.debug('__handleClickedNametag. doId = %s' % avatar.doId)
     if avatar.isPet():
         self.avatarPanel = PetAvatarPanel.PetAvatarPanel(avatar)
     elif isinstance(avatar, Toon.Toon) or isinstance(avatar, FriendHandle.FriendHandle):
         if hasattr(self, 'avatarPanel'):
             if self.avatarPanel:
                 if not hasattr(self.avatarPanel, 'getAvId') or self.avatarPanel.getAvId() == avatar.doId:
                     if not self.avatarPanel.isHidden():
                         if self.avatarPanel.getType() == 'toon':
                             return
         self.avatarPanel = ToonAvatarPanel.ToonAvatarPanel(avatar, playerId)
     else:
         self.avatarPanel = SuitAvatarPanel.SuitAvatarPanel(avatar)
예제 #2
0
 def __handleClickedNametag(self, avatar, playerId = None):
     """
     Called when an avatar in the world has been picked directly by
     clicking on his nametag, either in the 3-d world or on the
     margins of the 2-d screen.  This should open up an AvatarPanel
     featuring the selected avatar.
     """
     self.notify.debug("__handleClickedNametag. doId = %s" % avatar.doId)
     if avatar.isPet():
         self.avatarPanel = PetAvatarPanel.PetAvatarPanel(avatar)
     elif (isinstance(avatar, Toon.Toon) or
         isinstance(avatar, FriendHandle.FriendHandle)):
         if hasattr(self, "avatarPanel"):
             if self.avatarPanel:
                 if (not hasattr(self.avatarPanel, "getAvId")) or (self.avatarPanel.getAvId() == avatar.doId):
                     if not self.avatarPanel.isHidden():
                         if self.avatarPanel.getType() == "toon":
                             return
         self.avatarPanel = ToonAvatarPanel.ToonAvatarPanel(avatar, playerId)
     else:
         self.avatarPanel = SuitAvatarPanel.SuitAvatarPanel(avatar)