Esempio n. 1
0
 def cleanup(self):
     if AvatarPanel.currentAvatarPanel != self:
         return None
     
     AvatarDetailPanel.unloadAvatarDetail()
     self.frame.destroy()
     del self.frame
     self.head.removeNode()
     del self.head
     if self.isToon:
         self.headModel.stopBlink()
         self.headModel.stopLookAroundNow()
         self.headModel.delete()
         del self.headModel
     
     toonbase.localToon.obscureFriendsListButton(-1)
     self.laffMeter = None
     if self.avDisableName:
         self.ignore(self.avDisableName)
     
     if self.avGenerateName:
         self.ignore(self.avGenerateName)
     
     if self.avHpChangeName:
         self.ignore(self.avHpChangeName)
     
     self.ignore('updateLaffMeter')
     AvatarPanel.currentAvatarPanel = None
     return None
 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')
Esempio n. 3
0
    def unload(self):
        if self.avatarPanel:
            del self.avatarPanel

        FriendInviter.unloadFriendInviter()
        AvatarDetailPanel.unloadAvatarDetail()
        TeleportPanel.unloadTeleportPanel()
        return None
 def unload(self):
     if self.avatarPanel:
         del self.avatarPanel
     
     FriendInviter.unloadFriendInviter()
     AvatarDetailPanel.unloadAvatarDetail()
     TeleportPanel.unloadTeleportPanel()
     return None
 def __init__(self, avId, avName, avDisableName):
     DirectFrame.__init__(self, pos = (0.29999999999999999, 0.10000000000000001, 0.65000000000000002), image_color = GlobalDialogColor, image_scale = (1.0, 1.0, 0.59999999999999998), text = '', text_wordwrap = 13.5, text_scale = 0.059999999999999998, text_pos = (0.0, 0.13))
     self['image'] = getDefaultDialogGeom()
     self.avId = avId
     self.avName = avName
     self.avDisableName = avDisableName
     self.fsm = FSM.FSM('FriendInviter', [
         State.State('off', self.enterOff, self.exitOff),
         State.State('getNewFriend', self.enterGetNewFriend, self.exitGetNewFriend),
         State.State('begin', self.enterBegin, self.exitBegin),
         State.State('tooMany', self.enterTooMany, self.exitTooMany),
         State.State('notYet', self.enterNotYet, self.exitNotYet),
         State.State('checkAvailability', self.enterCheckAvailability, self.exitCheckAvailability),
         State.State('notAvailable', self.enterNotAvailable, self.exitNotAvailable),
         State.State('notAcceptingFriends', self.enterNotAcceptingFriends, self.exitNotAcceptingFriends),
         State.State('wentAway', self.enterWentAway, self.exitWentAway),
         State.State('already', self.enterAlready, self.exitAlready),
         State.State('askingCog', self.enterAskingCog, self.exitAskingCog),
         State.State('endFriendship', self.enterEndFriendship, self.exitEndFriendship),
         State.State('friendsNoMore', self.enterFriendsNoMore, self.exitFriendsNoMore),
         State.State('self', self.enterSelf, self.exitSelf),
         State.State('ignored', self.enterIgnored, self.exitIgnored),
         State.State('asking', self.enterAsking, self.exitAsking),
         State.State('yes', self.enterYes, self.exitYes),
         State.State('no', self.enterNo, self.exitNo),
         State.State('otherTooMany', self.enterOtherTooMany, self.exitOtherTooMany),
         State.State('maybe', self.enterMaybe, self.exitMaybe),
         State.State('down', self.enterDown, self.exitDown),
         State.State('cancel', self.enterCancel, self.exitCancel)], 'off', 'off')
     self.context = None
     TeleportPanel.hideTeleportPanel()
     AvatarDetailPanel.hideAvatarDetail()
     buttons = loader.loadModelOnce('phase_3/models/gui/dialog_box_buttons_gui')
     gui = loader.loadModelOnce('phase_3.5/models/gui/avatar_panel_gui')
     self.bOk = DirectButton(self, image = (buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr')), relief = None, text = Localizer.FriendInviterOK, text_scale = 0.050000000000000003, text_pos = (0.0, -0.10000000000000001), pos = (0.0, 0.0, -0.10000000000000001), command = self._FriendInviter__handleOk)
     self.bOk.hide()
     self.bCancel = DirectButton(self, image = (buttons.find('**/CloseBtn_UP'), buttons.find('**/CloseBtn_DN'), buttons.find('**/CloseBtn_Rllvr')), relief = None, text = Localizer.FriendInviterCancel, text_scale = 0.050000000000000003, text_pos = (0.0, -0.10000000000000001), pos = (0.0, 0.0, -0.10000000000000001), command = self._FriendInviter__handleCancel)
     self.bCancel.hide()
     self.bStop = DirectButton(self, image = (gui.find('**/Ignore_Btn_UP'), gui.find('**/Ignore_Btn_DN'), gui.find('**/Ignore_Btn_RLVR')), relief = None, text = Localizer.FriendInviterStopBeingFriends, text_scale = 0.050000000000000003, text_pos = (0.25, -0.014999999999999999), pos = (-0.20000000000000001, 0.0, 0.050000000000000003), command = self._FriendInviter__handleStop)
     self.bStop.hide()
     self.bYes = DirectButton(self, image = (buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr')), relief = None, text = Localizer.FriendInviterYes, text_scale = 0.050000000000000003, text_pos = (0.0, -0.10000000000000001), pos = (-0.14999999999999999, 0.0, -0.10000000000000001), command = self._FriendInviter__handleYes)
     self.bYes.hide()
     self.bNo = DirectButton(self, image = (buttons.find('**/CloseBtn_UP'), buttons.find('**/CloseBtn_DN'), buttons.find('**/CloseBtn_Rllvr')), relief = None, text = Localizer.FriendInviterNo, text_scale = 0.050000000000000003, text_pos = (0.0, -0.10000000000000001), pos = (0.14999999999999999, 0.0, -0.10000000000000001), command = self._FriendInviter__handleNo)
     self.bNo.hide()
     buttons.removeNode()
     gui.removeNode()
     self.fsm.enterInitialState()
     if self.avId == None:
         self.fsm.request('getNewFriend')
     else:
         self.fsm.request('begin')
 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
Esempio n. 8
0
 def _FriendsListManager__handleAvatarDetails(self, avId, avName):
     AvatarDetailPanel.showAvatarDetail(avId, avName)
     return None
 def __handleAvatarDetails(self, avId, avName):
     AvatarDetailPanel.showAvatarDetail(avId, avName)
     return None
     return
Esempio n. 10
0
 def _FriendsListManager__handleAvatarDetails(self, avId, avName):
     AvatarDetailPanel.showAvatarDetail(avId, avName)
     return None