def __handleClickedNametagPlayer(self, avatar, playerId, showType = 1): """ 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("__handleClickedNametagPlayer PlayerId%s" % (playerId)) if showType == 1: if hasattr(self, "avatarPanel"): if self.avatarPanel: if (not hasattr(self.avatarPanel, "getPlayerId")) or (self.avatarPanel.getPlayerId() == playerId): if not self.avatarPanel.isHidden(): if self.avatarPanel.getType() == "player": return self.avatarPanel = PlayerInfoPanel.PlayerInfoPanel(playerId) 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)
def __handleClickedNametagPlayer(self, avatar, playerId, showType=1): self.notify.debug('__handleClickedNametagPlayer PlayerId%s' % playerId) if showType == 1: if hasattr(self, 'avatarPanel'): if self.avatarPanel: if not hasattr( self.avatarPanel, 'getPlayerId' ) or self.avatarPanel.getPlayerId() == playerId: if not self.avatarPanel.isHidden(): if self.avatarPanel.getType() == 'player': return self.avatarPanel = PlayerInfoPanel.PlayerInfoPanel(playerId) else: if 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)