def exitFLM(self): self.notify.debug("FriendsListManager: exitFLM()") if self._preserveFriendsList: return if not self._entered: return self._entered = False self.ignore("openFriendsList") self.ignore("clickedNametag") base.localAvatar.setFriendsListButtonActive(0) NametagGlobals.setMasterNametagsActive(0) if self.avatarPanel: self.avatarPanel.cleanup() self.avatarPanel = None self.ignore("gotoAvatar") self.ignore("friendAvatar") self.ignore("avatarDetails") FriendsListPanel.hideFriendsList() ToontownFriendSecret.hideFriendSecret() if base.cr.friendManager: base.cr.friendManager.setAvailable(0) self.ignore("friendInvitation") FriendInviter.hideFriendInviter() ToonAvatarDetailPanel.hideAvatarDetail() ToonTeleportPanel.hideTeleportPanel() return
def exitFLM(self): self.notify.debug('FriendsListManager: exitFLM()') if self._preserveFriendsList: return if not self._entered: return self._entered = False self.ignore('openFriendsList') self.ignore('clickedNametag') self.ignore('clickedNametagPlayer') base.localAvatar.setFriendsListButtonActive(0) NametagGlobals.setWantActiveNametags(False) if self.avatarPanel: self.avatarPanel.cleanup() self.avatarPanel = None self.ignore('gotoAvatar') self.ignore('friendAvatar') self.ignore('avatarDetails') self.ignore('playerDetails') FriendsListPanel.hideFriendsList() ToontownFriendSecret.hideFriendSecret() if base.cr.friendManager: base.cr.friendManager.setAvailable(0) self.ignore('friendInvitation') FriendInviter.hideFriendInviter() ToonAvatarDetailPanel.hideAvatarDetail() ToonTeleportPanel.hideTeleportPanel() return
def __init__(self, avId, avName, avDisableName): DirectFrame.__init__(self, pos = (0.29999999999999999, 0.10000000000000001, 0.65000000000000002), image_color = ToontownGlobals.GlobalDialogColor, image_scale = (1.0, 1.0, 0.59999999999999998), text = '', text_wordwrap = 13.5, text_scale = 0.059999999999999998, text_pos = (0.0, 0.17999999999999999)) self['image'] = getDefaultDialogGeom() self.avId = avId self.avName = avName self.avDisableName = avDisableName self.fsm = FSM.FSM('TeleportPanel', [ State.State('off', self.enterOff, self.exitOff), State.State('begin', self.enterBegin, self.exitBegin), State.State('checkAvailability', self.enterCheckAvailability, self.exitCheckAvailability), State.State('notAvailable', self.enterNotAvailable, self.exitNotAvailable), State.State('ignored', self.enterIgnored, self.exitIgnored), State.State('notOnline', self.enterNotOnline, self.exitNotOnline), State.State('wentAway', self.enterWentAway, self.exitWentAway), State.State('self', self.enterSelf, self.exitSelf), State.State('unknownHood', self.enterUnknownHood, self.exitUnknownHood), State.State('unavailableHood', self.enterUnavailableHood, self.exitUnavailableHood), State.State('otherShard', self.enterOtherShard, self.exitOtherShard), State.State('teleport', self.enterTeleport, self.exitTeleport)], 'off', 'off') FriendInviter.hideFriendInviter() AvatarDetailPanel.hideAvatarDetail() buttons = loader.loadModelOnce('phase_3/models/gui/dialog_box_buttons_gui') self.bOk = DirectButton(self, image = (buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr')), relief = None, text = 'OK', text_scale = 0.050000000000000003, text_pos = (0.0, -0.10000000000000001), pos = (0.0, 0.0, -0.10000000000000001), command = self._TeleportPanel__handleOk) self.bOk.hide() self.bCancel = DirectButton(self, image = (buttons.find('**/CloseBtn_UP'), buttons.find('**/CloseBtn_DN'), buttons.find('**/CloseBtn_Rllvr')), relief = None, text = 'Cancel', text_scale = 0.050000000000000003, text_pos = (0.0, -0.10000000000000001), pos = (0.0, 0.0, -0.10000000000000001), command = self._TeleportPanel__handleCancel) self.bCancel.hide() self.bYes = DirectButton(self, image = (buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr')), relief = None, text = 'Yes', text_scale = 0.050000000000000003, text_pos = (0.0, -0.10000000000000001), pos = (-0.14999999999999999, 0.0, -0.14999999999999999), command = self._TeleportPanel__handleYes) self.bYes.hide() self.bNo = DirectButton(self, image = (buttons.find('**/CloseBtn_UP'), buttons.find('**/CloseBtn_DN'), buttons.find('**/CloseBtn_Rllvr')), relief = None, text = 'No', text_scale = 0.050000000000000003, text_pos = (0.0, -0.10000000000000001), pos = (0.14999999999999999, 0.0, -0.14999999999999999), command = self._TeleportPanel__handleNo) self.bNo.hide() buttons.removeNode() self.accept(self.avDisableName, self._TeleportPanel__handleDisableAvatar) self.show() self.fsm.enterInitialState() self.fsm.request('begin')
def exitFLM(self): self.notify.debug('FriendsListManager: exitFLM()') if self._preserveFriendsList: return if not self._entered: return self._entered = False self.ignore('openFriendsList') self.ignore('clickedNametag') self.ignore('clickedNametagPlayer') base.localAvatar.setFriendsListButtonActive(0) NametagGlobals.setMasterNametagsActive(0) if self.avatarPanel: self.avatarPanel.cleanup() self.avatarPanel = None self.ignore('gotoAvatar') self.ignore('friendAvatar') self.ignore('avatarDetails') self.ignore('playerDetails') FriendsListPanel.hideFriendsList() ToontownFriendSecret.hideFriendSecret() if base.cr.friendManager: base.cr.friendManager.setAvailable(0) self.ignore('friendInvitation') FriendInviter.hideFriendInviter() ToonAvatarDetailPanel.hideAvatarDetail() ToonTeleportPanel.hideTeleportPanel() return
def __init__(self, avId, avName, parent=aspect2d, **kw): buttons = loader.loadModelOnce( 'phase_3/models/gui/dialog_box_buttons_gui') gui = loader.loadModelOnce('phase_3.5/models/gui/avatar_panel_gui') detailPanel = gui.find('**/avatarInfoPanel') optiondefs = (('pos', (0.52500000000000002, 0.0, 0.52500000000000002), None), ('scale', 0.5, None), ('relief', None, None), ('image', detailPanel, None), ('image_color', GlobalDialogColor, None), ('text', '', None), ('text_wordwrap', 10.4, None), ('text_scale', 0.13200000000000001, None), ('text_pos', (0.0, 0.75), None)) self.defineoptions(kw, optiondefs) DirectFrame.__init__(self, parent) self.dataText = DirectLabel(self, text='', text_scale=0.089999999999999997, text_align=TextNode.ALeft, text_wordwrap=15, relief=None, pos=(-0.69999999999999996, 0.0, 0.5)) self.avId = avId self.avName = avName self.avatar = None self.createdAvatar = None self.fsm = FSM.FSM('AvatarDetailPanel', [ State.State('off', self.enterOff, self.exitOff, ['begin']), State.State('begin', self.enterBegin, self.exitBegin, ['query', 'data', 'off']), State.State('query', self.enterQuery, self.exitQuery, ['data', 'invalid', 'off']), State.State('data', self.enterData, self.exitData, ['off']), State.State('invalid', self.enterInvalid, self.exitInvalid, ['off']) ], 'off', 'off') TeleportPanel.hideTeleportPanel() FriendInviter.hideFriendInviter() self.bCancel = DirectButton( self, image=(buttons.find('**/CloseBtn_UP'), buttons.find('**/CloseBtn_DN'), buttons.find('**/CloseBtn_Rllvr')), relief=None, text=Localizer.AvatarDetailPanelCancel, text_scale=0.050000000000000003, text_pos=(0.12, -0.01), pos=(-0.68000000000000005, 0.0, -0.76000000000000001), scale=2.0, command=self._AvatarDetailPanel__handleCancel) self.bCancel.hide() self.initialiseoptions(AvatarDetailPanel) self.fsm.enterInitialState() self.fsm.request('begin') buttons.removeNode() gui.removeNode()
def exitFLM(self): self.notify.debug("FriendsListManager: exitFLM()") # check to see if we're staying active over a Place state transition if self._preserveFriendsList: return if not self._entered: return self._entered = False # Put away the friends list self.ignore("openFriendsList") self.ignore("clickedNametag") self.ignore("clickedNametagPlayer") base.localAvatar.setFriendsListButtonActive(0) # Since we're no longer listening for the click event, make the # nametags not be clickable. NametagGlobals.setMasterNametagsActive(0) # Put away the avatar panel if self.avatarPanel: self.avatarPanel.cleanup() self.avatarPanel = None self.ignore("gotoAvatar") self.ignore("friendAvatar") self.ignore("avatarDetails") self.ignore("playerDetails") # And the friends list panel FriendsListPanel.hideFriendsList() # Put away the Secrets panel ToontownFriendSecret.hideFriendSecret() # No longer interested in invitations from friends if base.cr.friendManager: base.cr.friendManager.setAvailable(0) self.ignore("friendInvitation") # Close these auxiliary panels, if they are open. FriendInviter.hideFriendInviter() ToonAvatarDetailPanel.hideAvatarDetail() ToonTeleportPanel.hideTeleportPanel()
def exit(self): self.ignore('openFriendsList') self.ignore('clickedNametag') toonbase.localToon.setFriendsListButtonActive(0) NametagGlobals.setMasterNametagsActive(0) if self.avatarPanel: self.avatarPanel.cleanup() self.avatarPanel = None self.ignore('gotoAvatar') self.ignore('friendAvatar') self.ignore('avatarDetails') FriendsListPanel.hideFriendsList() FriendSecret.hideFriendSecret() if toonbase.tcr.friendManager: toonbase.tcr.friendManager.setAvailable(0) self.ignore('friendInvitation') FriendInviter.hideFriendInviter() AvatarDetailPanel.hideAvatarDetail() TeleportPanel.hideTeleportPanel() return None return
def exit(self): self.ignore('openFriendsList') self.ignore('clickedNametag') toonbase.localToon.setFriendsListButtonActive(0) NametagGlobals.setMasterNametagsActive(0) if self.avatarPanel: self.avatarPanel.cleanup() self.avatarPanel = None self.ignore('gotoAvatar') self.ignore('friendAvatar') self.ignore('avatarDetails') FriendsListPanel.hideFriendsList() FriendSecret.hideFriendSecret() if toonbase.tcr.friendManager: toonbase.tcr.friendManager.setAvailable(0) self.ignore('friendInvitation') FriendInviter.hideFriendInviter() AvatarDetailPanel.hideAvatarDetail() TeleportPanel.hideTeleportPanel() return None
def __init__(self, avId, avName, parent = aspect2d, **kw): buttons = loader.loadModelOnce('phase_3/models/gui/dialog_box_buttons_gui') gui = loader.loadModelOnce('phase_3.5/models/gui/avatar_panel_gui') detailPanel = gui.find('**/avatarInfoPanel') optiondefs = (('pos', (0.52500000000000002, 0.0, 0.52500000000000002), None), ('scale', 0.5, None), ('relief', None, None), ('image', detailPanel, None), ('image_color', GlobalDialogColor, None), ('text', '', None), ('text_wordwrap', 10.4, None), ('text_scale', 0.13200000000000001, None), ('text_pos', (0.0, 0.75), None)) self.defineoptions(kw, optiondefs) DirectFrame.__init__(self, parent) self.dataText = DirectLabel(self, text = '', text_scale = 0.089999999999999997, text_align = TextNode.ALeft, text_wordwrap = 15, relief = None, pos = (-0.69999999999999996, 0.0, 0.5)) self.avId = avId self.avName = avName self.avatar = None self.createdAvatar = None self.fsm = FSM.FSM('AvatarDetailPanel', [ State.State('off', self.enterOff, self.exitOff, [ 'begin']), State.State('begin', self.enterBegin, self.exitBegin, [ 'query', 'data', 'off']), State.State('query', self.enterQuery, self.exitQuery, [ 'data', 'invalid', 'off']), State.State('data', self.enterData, self.exitData, [ 'off']), State.State('invalid', self.enterInvalid, self.exitInvalid, [ 'off'])], 'off', 'off') TeleportPanel.hideTeleportPanel() FriendInviter.hideFriendInviter() self.bCancel = DirectButton(self, image = (buttons.find('**/CloseBtn_UP'), buttons.find('**/CloseBtn_DN'), buttons.find('**/CloseBtn_Rllvr')), relief = None, text = Localizer.AvatarDetailPanelCancel, text_scale = 0.050000000000000003, text_pos = (0.12, -0.01), pos = (-0.68000000000000005, 0.0, -0.76000000000000001), scale = 2.0, command = self._AvatarDetailPanel__handleCancel) self.bCancel.hide() self.initialiseoptions(AvatarDetailPanel) self.fsm.enterInitialState() self.fsm.request('begin') buttons.removeNode() gui.removeNode()