parent
30cb83cfd2
commit
63d6036a7e
|
|
@ -35,16 +35,13 @@ class OTPTimer(DirectFrame):
|
|||
return OTPTimer.ClockImage
|
||||
|
||||
def posInTopRightCorner(self):
|
||||
self.reparentTo(base.a2dTopRight)
|
||||
self.setPos(-.17, 0, -.17)
|
||||
self.setPos(1.16, 0, 0.83)
|
||||
|
||||
def posBelowTopRightCorner(self):
|
||||
base.reparentTo(base.a2dTopRight)
|
||||
self.setPos(-.17, 0, -.4)
|
||||
self.setPos(1.16, 0, 0.58)
|
||||
|
||||
def posAboveShtikerBook(self):
|
||||
self.reparentTo(base.a2dBottomRight)
|
||||
self.setPos(-.173, 0, .37)
|
||||
self.setPos(1.16, 0, -.63)
|
||||
|
||||
def setTime(self, time):
|
||||
time = bound(time, 0, 999)
|
||||
|
|
|
|||
|
|
@ -32,108 +32,28 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
|
||||
def __init__(self, cr, localAvatar):
|
||||
gui = loader.loadModel('phase_3.5/models/gui/chat_input_gui')
|
||||
self.normalButton = DirectButton(
|
||||
image = (gui.find('**/ChtBx_ChtBtn_UP'), gui.find('**/ChtBx_ChtBtn_DN'), gui.find('**/ChtBx_ChtBtn_RLVR')),
|
||||
parent = base.a2dTopLeft,
|
||||
pos = (0.0683, 0, -0.072),
|
||||
scale = 1.179,
|
||||
relief = None,
|
||||
image_color = Vec4(1, 1, 1, 1),
|
||||
text = ('', OTPLocalizer.ChatManagerChat, OTPLocalizer.ChatManagerChat),
|
||||
text_align = TextNode.ALeft,
|
||||
text_scale = TTLocalizer.TCMnormalButton,
|
||||
text_fg = Vec4(1, 1, 1, 1),
|
||||
text_shadow = Vec4(0, 0, 0, 1),
|
||||
text_pos = (-0.0525, -0.09),
|
||||
textMayChange = 0,
|
||||
sortOrder = DGG.FOREGROUND_SORT_INDEX,
|
||||
command = self.__normalButtonPressed
|
||||
)
|
||||
self.normalButton = DirectButton(image=(gui.find('**/ChtBx_ChtBtn_UP'), gui.find('**/ChtBx_ChtBtn_DN'), gui.find('**/ChtBx_ChtBtn_RLVR')), pos=(-1.2647, 0, 0.928), scale=1.179, relief=None, image_color=Vec4(1, 1, 1, 1), text=('', OTPLocalizer.ChatManagerChat, OTPLocalizer.ChatManagerChat), text_align=TextNode.ALeft, text_scale=TTLocalizer.TCMnormalButton, text_fg=Vec4(1, 1, 1, 1), text_shadow=Vec4(0, 0, 0, 1), text_pos=(-0.0525, -0.09), textMayChange=0, sortOrder=DGG.FOREGROUND_SORT_INDEX, command=self.__normalButtonPressed)
|
||||
self.normalButton.hide()
|
||||
self.openScSfx = loader.loadSfx('phase_3.5/audio/sfx/GUI_quicktalker.ogg')
|
||||
self.openScSfx.setVolume(0.6)
|
||||
self.scButton = DirectButton(
|
||||
image = (gui.find('**/ChtBx_ChtBtn_UP'), gui.find('**/ChtBx_ChtBtn_DN'), gui.find('**/ChtBx_ChtBtn_RLVR')),
|
||||
parent = base.a2dTopLeft,
|
||||
pos = TTLocalizer.TCMscButtonPos,
|
||||
scale = 1.179,
|
||||
relief = None,
|
||||
image_color = Vec4(0.75, 1, 0.6, 1),
|
||||
text = ('', OTPLocalizer.GlobalSpeedChatName, OTPLocalizer.GlobalSpeedChatName),
|
||||
text_scale = TTLocalizer.TCMscButton,
|
||||
text_fg = Vec4(1, 1, 1, 1),
|
||||
text_shadow = Vec4(0, 0, 0, 1),
|
||||
text_pos = (0, -0.09),
|
||||
textMayChange = 0,
|
||||
sortOrder = DGG.FOREGROUND_SORT_INDEX,
|
||||
command = self.__scButtonPressed,
|
||||
clickSound = self.openScSfx
|
||||
)
|
||||
self.scButton = DirectButton(image=(gui.find('**/ChtBx_ChtBtn_UP'), gui.find('**/ChtBx_ChtBtn_DN'), gui.find('**/ChtBx_ChtBtn_RLVR')), pos=TTLocalizer.TCMscButtonPos, scale=1.179, relief=None, image_color=Vec4(0.75, 1, 0.6, 1), text=('', OTPLocalizer.GlobalSpeedChatName, OTPLocalizer.GlobalSpeedChatName), text_scale=TTLocalizer.TCMscButton, text_fg=Vec4(1, 1, 1, 1), text_shadow=Vec4(0, 0, 0, 1), text_pos=(0, -0.09), textMayChange=0, sortOrder=DGG.FOREGROUND_SORT_INDEX, command=self.__scButtonPressed, clickSound=self.openScSfx)
|
||||
self.scButton.hide()
|
||||
self.whisperFrame = DirectFrame(
|
||||
parent = aspect2dp,
|
||||
relief = None,
|
||||
image = DGG.getDefaultDialogGeom(),
|
||||
image_scale = (0.45, 0.45, 0.45),
|
||||
image_color = OTPGlobals.GlobalDialogColor,
|
||||
pos = (-0.4, 0, 0.754),
|
||||
text = OTPLocalizer.ChatManagerWhisperTo,
|
||||
text_wordwrap = 7.0,
|
||||
text_scale = TTLocalizer.TCMwhisperFrame,
|
||||
text_fg = Vec4(0, 0, 0, 1),
|
||||
text_pos = (0, 0.14),
|
||||
textMayChange = 1,
|
||||
sortOrder = DGG.FOREGROUND_SORT_INDEX
|
||||
)
|
||||
self.whisperFrame = DirectFrame(parent=aspect2dp, relief=None, image=DGG.getDefaultDialogGeom(), image_scale=(0.45, 0.45, 0.45), image_color=OTPGlobals.GlobalDialogColor, pos=(-0.4, 0, 0.754), text=OTPLocalizer.ChatManagerWhisperTo, text_wordwrap=7.0, text_scale=TTLocalizer.TCMwhisperFrame, text_fg=Vec4(0, 0, 0, 1), text_pos=(0, 0.14), textMayChange=1, sortOrder=DGG.FOREGROUND_SORT_INDEX)
|
||||
self.whisperFrame.hide()
|
||||
self.whisperButton = DirectButton(
|
||||
parent = self.whisperFrame,
|
||||
image = (gui.find('**/ChtBx_ChtBtn_UP'), gui.find('**/ChtBx_ChtBtn_DN'), gui.find('**/ChtBx_ChtBtn_RLVR')),
|
||||
pos = (-0.125, 0, -0.1),
|
||||
scale = 1.179,
|
||||
relief = None,
|
||||
image_color = Vec4(1, 1, 1, 1),
|
||||
text = ('', OTPLocalizer.ChatManagerChat, OTPLocalizer.ChatManagerChat, ''),
|
||||
image3_color = Vec4(0.6, 0.6, 0.6, 0.6),
|
||||
text_scale = TTLocalizer.TCMwhisperButton,
|
||||
text_fg = (0, 0, 0, 1),
|
||||
text_pos = (0, -0.09),
|
||||
textMayChange = 0,
|
||||
command = self.__whisperButtonPressed
|
||||
)
|
||||
self.whisperScButton = DirectButton(
|
||||
parent = self.whisperFrame,
|
||||
image = (gui.find('**/ChtBx_ChtBtn_UP'), gui.find('**/ChtBx_ChtBtn_DN'), gui.find('**/ChtBx_ChtBtn_RLVR')),
|
||||
pos = (0.0, 0, -0.1),
|
||||
scale = 1.179,
|
||||
relief = None,
|
||||
image_color = Vec4(0.75, 1, 0.6, 1),
|
||||
text = ('', OTPLocalizer.GlobalSpeedChatName, OTPLocalizer.GlobalSpeedChatName, ''),
|
||||
image3_color = Vec4(0.6, 0.6, 0.6, 0.6),
|
||||
text_scale = TTLocalizer.TCMwhisperScButton,
|
||||
text_fg = (0, 0, 0, 1),
|
||||
text_pos = (0, -0.09),
|
||||
textMayChange = 0,
|
||||
command = self.__whisperScButtonPressed
|
||||
)
|
||||
self.whisperCancelButton = DirectButton(
|
||||
parent = self.whisperFrame,
|
||||
image = (gui.find('**/CloseBtn_UP'), gui.find('**/CloseBtn_DN'), gui.find('**/CloseBtn_Rllvr')),
|
||||
pos = (0.125, 0, -0.1),
|
||||
scale = 1.179,
|
||||
relief = None,
|
||||
text = ('', OTPLocalizer.ChatManagerCancel, OTPLocalizer.ChatManagerCancel),
|
||||
text_scale = 0.05,
|
||||
text_fg = (0, 0, 0, 1),
|
||||
text_pos = (0, -0.09),
|
||||
textMayChange = 0,
|
||||
command = self.__whisperCancelPressed
|
||||
)
|
||||
self.whisperButton = DirectButton(parent=self.whisperFrame, image=(gui.find('**/ChtBx_ChtBtn_UP'), gui.find('**/ChtBx_ChtBtn_DN'), gui.find('**/ChtBx_ChtBtn_RLVR')), pos=(-0.125, 0, -0.1), scale=1.179, relief=None, image_color=Vec4(1, 1, 1, 1), text=('',
|
||||
OTPLocalizer.ChatManagerChat,
|
||||
OTPLocalizer.ChatManagerChat,
|
||||
''), image3_color=Vec4(0.6, 0.6, 0.6, 0.6), text_scale=TTLocalizer.TCMwhisperButton, text_fg=(0, 0, 0, 1), text_pos=(0, -0.09), textMayChange=0, command=self.__whisperButtonPressed)
|
||||
self.whisperScButton = DirectButton(parent=self.whisperFrame, image=(gui.find('**/ChtBx_ChtBtn_UP'), gui.find('**/ChtBx_ChtBtn_DN'), gui.find('**/ChtBx_ChtBtn_RLVR')), pos=(0.0, 0, -0.1), scale=1.179, relief=None, image_color=Vec4(0.75, 1, 0.6, 1), text=('',
|
||||
OTPLocalizer.GlobalSpeedChatName,
|
||||
OTPLocalizer.GlobalSpeedChatName,
|
||||
''), image3_color=Vec4(0.6, 0.6, 0.6, 0.6), text_scale=TTLocalizer.TCMwhisperScButton, text_fg=(0, 0, 0, 1), text_pos=(0, -0.09), textMayChange=0, command=self.__whisperScButtonPressed)
|
||||
self.whisperCancelButton = DirectButton(parent=self.whisperFrame, image=(gui.find('**/CloseBtn_UP'), gui.find('**/CloseBtn_DN'), gui.find('**/CloseBtn_Rllvr')), pos=(0.125, 0, -0.1), scale=1.179, relief=None, text=('', OTPLocalizer.ChatManagerCancel, OTPLocalizer.ChatManagerCancel), text_scale=0.05, text_fg=(0, 0, 0, 1), text_pos=(0, -0.09), textMayChange=0, command=self.__whisperCancelPressed)
|
||||
gui.removeNode()
|
||||
ChatManager.ChatManager.__init__(self, cr, localAvatar)
|
||||
self.defaultToWhiteList = base.config.GetBool('white-list-is-default', 1)
|
||||
self.chatInputSpeedChat = TTChatInputSpeedChat(self)
|
||||
self.normalPos = Vec3(0.25, 0, -0.196)
|
||||
self.normalPos = Vec3(-1.083, 0, 0.804)
|
||||
self.whisperPos = Vec3(0.0, 0, 0.71)
|
||||
self.speedChatPlusPos = Vec3(-0.35, 0, 0.71)
|
||||
self.chatInputWhiteList = TTChatInputWhiteList()
|
||||
|
|
@ -143,9 +63,9 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
self.chatInputNormal.desc = 'chatInputNormal'
|
||||
else:
|
||||
self.chatInputNormal = TTChatInputNormal(self)
|
||||
self.chatInputWhiteList.reparentTo(base.a2dTopLeft)
|
||||
self.chatInputWhiteList.setPos(self.speedChatPlusPos)
|
||||
self.chatInputWhiteList.desc = 'chatInputWhiteList'
|
||||
return
|
||||
|
||||
def delete(self):
|
||||
ChatManager.ChatManager.delete(self)
|
||||
|
|
@ -207,6 +127,7 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
self.scButton.show()
|
||||
if not normObs:
|
||||
self.normalButton.show()
|
||||
return
|
||||
|
||||
def enterMainMenu(self):
|
||||
self.chatInputNormal.setPos(self.normalPos)
|
||||
|
|
@ -266,6 +187,7 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
self.scButton.show()
|
||||
if not normObs:
|
||||
self.normalButton.show()
|
||||
return
|
||||
|
||||
def exitUnpaidChatWarning(self):
|
||||
if self.unpaidChatWarning:
|
||||
|
|
@ -281,6 +203,7 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
DirectButton(self.noSecretChatAtAll, image=okButtonImage, relief=None, text=OTPLocalizer.NoSecretChatAtAllOK, text_scale=0.05, text_pos=(0.0, -0.1), textMayChange=0, pos=(0.0, 0.0, -0.4), command=self.__handleNoSecretChatAtAllOK)
|
||||
buttons.removeNode()
|
||||
self.noSecretChatAtAll.show()
|
||||
return
|
||||
|
||||
def exitNoSecretChatAtAll(self):
|
||||
self.noSecretChatAtAll.hide()
|
||||
|
|
@ -319,6 +242,7 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
self.passwordEntry['focus'] = 1
|
||||
self.passwordEntry.enterText('')
|
||||
self.noSecretChatWarning.show()
|
||||
return
|
||||
|
||||
def exitNoSecretChatWarning(self):
|
||||
self.noSecretChatWarning.hide()
|
||||
|
|
@ -370,6 +294,7 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
innerCircle.removeNode()
|
||||
self.__initializeCheckBoxen()
|
||||
self.activateChatGui.show()
|
||||
return
|
||||
|
||||
def __initializeCheckBoxen(self):
|
||||
if base.cr.secretChatAllowed and not base.cr.secretChatNeedsParentPassword:
|
||||
|
|
@ -420,6 +345,7 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
else:
|
||||
self.secretChatActivated['text'] = modeText
|
||||
self.secretChatActivated.show()
|
||||
return
|
||||
|
||||
def exitSecretChatActivated(self):
|
||||
self.secretChatActivated.hide()
|
||||
|
|
@ -432,6 +358,7 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
DirectButton(self.problemActivatingChat, image=buttonImage, relief=None, text=OTPLocalizer.ProblemActivatingChatOK, text_scale=0.05, text_pos=(0.0, -0.1), textMayChange=0, pos=(0.0, 0.0, -0.28), command=self.__handleProblemActivatingChatOK)
|
||||
buttons.removeNode()
|
||||
self.problemActivatingChat.show()
|
||||
return
|
||||
|
||||
def exitProblemActivatingChat(self):
|
||||
self.problemActivatingChat.hide()
|
||||
|
|
@ -499,12 +426,14 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
return
|
||||
if avatarId:
|
||||
self.fsm.request('whisperChat', [avatarName, avatarId])
|
||||
return
|
||||
|
||||
def enterNormalChat(self):
|
||||
result = ChatManager.ChatManager.enterNormalChat(self)
|
||||
if result == None:
|
||||
self.notify.warning('something went wrong in enterNormalChat, falling back to main menu')
|
||||
self.fsm.request('mainMenu')
|
||||
return
|
||||
|
||||
def enterWhisperChatPlayer(self, avatarName, playerId):
|
||||
result = ChatManager.ChatManager.enterWhisperChatPlayer(self, avatarName, playerId)
|
||||
|
|
@ -512,6 +441,7 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
if result == None:
|
||||
self.notify.warning('something went wrong in enterWhisperChatPlayer, falling back to main menu')
|
||||
self.fsm.request('mainMenu')
|
||||
return
|
||||
|
||||
def enterWhisperChat(self, avatarName, avatarId):
|
||||
result = ChatManager.ChatManager.enterWhisperChat(self, avatarName, avatarId)
|
||||
|
|
@ -519,6 +449,7 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
if result == None:
|
||||
self.notify.warning('something went wrong in enterWhisperChat, falling back to main menu')
|
||||
self.fsm.request('mainMenu')
|
||||
return
|
||||
|
||||
def enterNoSecretChatAtAllAndNoWhitelist(self):
|
||||
if self.noSecretChatAtAllAndNoWhitelist == None:
|
||||
|
|
@ -529,6 +460,7 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
DirectButton(self.noSecretChatAtAllAndNoWhitelist, image=okButtonImage, relief=None, text=OTPLocalizer.NoSecretChatAtAllOK, text_scale=0.05, text_pos=(0.0, -0.1), textMayChange=0, pos=(0.0, 0.0, -0.64), command=self.__handleNoSecretChatAtAllOK)
|
||||
buttons.removeNode()
|
||||
self.noSecretChatAtAllAndNoWhitelist.show()
|
||||
return
|
||||
|
||||
def exitNoSecretChatAtAllAndNoWhitelist(self):
|
||||
self.noSecretChatAtAllAndNoWhitelist.hide()
|
||||
|
|
@ -543,6 +475,7 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
else:
|
||||
self.notify.warning("Enter: %s has no 'stopped' state." % place)
|
||||
self.teaser = TeaserPanel.TeaserPanel(pageName='secretChat', doneFunc=self.handleOkTeaser)
|
||||
return
|
||||
|
||||
def exitTrueFriendTeaserPanel(self):
|
||||
self.teaser.destroy()
|
||||
|
|
@ -644,6 +577,7 @@ class ToontownChatManager(ChatManager.ChatManager):
|
|||
message = 'Parent Password was invalid.'
|
||||
self.fsm.request('problemActivatingChat')
|
||||
self.problemActivatingChat['text'] = OTPLocalizer.ProblemActivatingChat % message
|
||||
return
|
||||
|
||||
def __handleActivateChatMoreInfo(self):
|
||||
self.fsm.request('chatMoreInfo')
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ from direct.gui.DirectGui import *
|
|||
from panda3d.core import *
|
||||
from direct.showbase import DirectObject
|
||||
from direct.fsm import ClassicFSM, State
|
||||
from direct.fsm import State
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from toontown.toonbase import TTLocalizer
|
||||
from toontown.toon import ToonTeleportPanel
|
||||
|
|
@ -21,6 +22,7 @@ def showFriendInviter(avId, avName, avDisableName):
|
|||
globalFriendInviter.cleanup()
|
||||
globalFriendInviter = None
|
||||
globalFriendInviter = FriendInviter(avId, avName, avDisableName)
|
||||
return
|
||||
|
||||
|
||||
def hideFriendInviter():
|
||||
|
|
@ -28,6 +30,7 @@ def hideFriendInviter():
|
|||
if globalFriendInviter != None:
|
||||
globalFriendInviter.cleanup()
|
||||
globalFriendInviter = None
|
||||
return
|
||||
|
||||
|
||||
def unloadFriendInviter():
|
||||
|
|
@ -35,6 +38,7 @@ def unloadFriendInviter():
|
|||
if globalFriendInviter != None:
|
||||
globalFriendInviter.cleanup()
|
||||
globalFriendInviter = None
|
||||
return
|
||||
|
||||
|
||||
class FriendInviter(DirectFrame):
|
||||
|
|
@ -42,17 +46,7 @@ class FriendInviter(DirectFrame):
|
|||
|
||||
def __init__(self, avId, avName, avDisableName):
|
||||
self.wantPlayerFriends = base.config.GetBool('want-player-friends', 0)
|
||||
DirectFrame.__init__(
|
||||
self,
|
||||
parent = base.a2dTopRight,
|
||||
pos = (-1.033, 0.1, -0.35),
|
||||
image_color = GlobalDialogColor,
|
||||
image_scale = (1.0, 1.0, 0.6),
|
||||
text = '',
|
||||
text_wordwrap = TTLocalizer.FIdirectFrameWordwrap,
|
||||
text_scale = TTLocalizer.FIdirectFrame,
|
||||
text_pos = TTLocalizer.FIdirectFramePos
|
||||
)
|
||||
DirectFrame.__init__(self, pos=(0.3, 0.1, 0.65), image_color=GlobalDialogColor, image_scale=(1.0, 1.0, 0.6), text='', text_wordwrap=TTLocalizer.FIdirectFrameWordwrap, text_scale=TTLocalizer.FIdirectFrame, text_pos=TTLocalizer.FIdirectFramePos)
|
||||
self['image'] = DGG.getDefaultDialogGeom()
|
||||
self.avId = avId
|
||||
self.toonName = avName
|
||||
|
|
@ -93,103 +87,22 @@ class FriendInviter(DirectFrame):
|
|||
ToonAvatarDetailPanel.hideAvatarDetail()
|
||||
buttons = loader.loadModel('phase_3/models/gui/dialog_box_buttons_gui')
|
||||
gui = loader.loadModel('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 = OTPLocalizer.FriendInviterOK,
|
||||
text_scale = 0.05,
|
||||
text_pos = (0.0, -0.1),
|
||||
pos = (0.0, 0.0, -0.1),
|
||||
command = self.__handleOk
|
||||
)
|
||||
self.bOk = DirectButton(self, image=(buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr')), relief=None, text=OTPLocalizer.FriendInviterOK, text_scale=0.05, text_pos=(0.0, -0.1), pos=(0.0, 0.0, -0.1), command=self.__handleOk)
|
||||
self.bOk.hide()
|
||||
self.bCancel = DirectButton(
|
||||
self,
|
||||
image = (buttons.find('**/CloseBtn_UP'), buttons.find('**/CloseBtn_DN'), buttons.find('**/CloseBtn_Rllvr')),
|
||||
relief = None,
|
||||
text = OTPLocalizer.FriendInviterCancel,
|
||||
text_scale = 0.05,
|
||||
text_pos = (0.0, -0.1),
|
||||
pos = TTLocalizer.FIbCancelPos,
|
||||
command = self.__handleCancel
|
||||
)
|
||||
self.bCancel = DirectButton(self, image=(buttons.find('**/CloseBtn_UP'), buttons.find('**/CloseBtn_DN'), buttons.find('**/CloseBtn_Rllvr')), relief=None, text=OTPLocalizer.FriendInviterCancel, text_scale=0.05, text_pos=(0.0, -0.1), pos=TTLocalizer.FIbCancelPos, command=self.__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 = OTPLocalizer.FriendInviterStopBeingFriends,
|
||||
text_align = TextNode.ALeft,
|
||||
text_scale = TTLocalizer.FIbStop,
|
||||
text_pos = TTLocalizer.FIbStopTextPos,
|
||||
pos = TTLocalizer.FIbStopPos,
|
||||
command = self.__handleStop
|
||||
)
|
||||
self.bStop = DirectButton(self, image=(gui.find('**/Ignore_Btn_UP'), gui.find('**/Ignore_Btn_DN'), gui.find('**/Ignore_Btn_RLVR')), relief=None, text=OTPLocalizer.FriendInviterStopBeingFriends, text_align=TextNode.ALeft, text_scale=TTLocalizer.FIbStop, text_pos=TTLocalizer.FIbStopTextPos, pos=TTLocalizer.FIbStopPos, command=self.__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 = OTPLocalizer.FriendInviterYes,
|
||||
text_scale = 0.05,
|
||||
text_pos = (0.0, -0.1),
|
||||
pos = TTLocalizer.FIbYesPos,
|
||||
command = self.__handleYes
|
||||
)
|
||||
self.bYes = DirectButton(self, image=(buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr')), relief=None, text=OTPLocalizer.FriendInviterYes, text_scale=0.05, text_pos=(0.0, -0.1), pos=TTLocalizer.FIbYesPos, command=self.__handleYes)
|
||||
self.bYes.hide()
|
||||
self.bNo = DirectButton(
|
||||
self,
|
||||
image = (buttons.find('**/CloseBtn_UP'), buttons.find('**/CloseBtn_DN'), buttons.find('**/CloseBtn_Rllvr')),
|
||||
relief = None,
|
||||
text = OTPLocalizer.FriendInviterNo,
|
||||
text_scale = 0.05,
|
||||
text_pos = (0.0, -0.1),
|
||||
pos = (0.15, 0.0, -0.1),
|
||||
command = self.__handleNo
|
||||
)
|
||||
self.bNo = DirectButton(self, image=(buttons.find('**/CloseBtn_UP'), buttons.find('**/CloseBtn_DN'), buttons.find('**/CloseBtn_Rllvr')), relief=None, text=OTPLocalizer.FriendInviterNo, text_scale=0.05, text_pos=(0.0, -0.1), pos=(0.15, 0.0, -0.1), command=self.__handleNo)
|
||||
self.bNo.hide()
|
||||
self.bToon = DirectButton(
|
||||
self,
|
||||
image = (buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr')),
|
||||
relief = None,
|
||||
text = TTLocalizer.FriendInviterToon,
|
||||
text_scale = 0.05,
|
||||
text_pos = (0.0, -0.1),
|
||||
pos = (-0.35, 0.0, -0.05),
|
||||
command = self.__handleToon
|
||||
)
|
||||
toonText = DirectLabel(
|
||||
parent = self,
|
||||
relief = None,
|
||||
pos = Vec3(0.35, 0, -0.2),
|
||||
text = TTLocalizer.FriendInviterToonFriendInfo,
|
||||
text_fg = (0, 0, 0, 1),
|
||||
text_pos = (0, 0),
|
||||
text_scale = 0.045,
|
||||
text_align = TextNode.ACenter
|
||||
)
|
||||
self.bToon = DirectButton(self, image=(buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr')), relief=None, text=TTLocalizer.FriendInviterToon, text_scale=0.05, text_pos=(0.0, -0.1), pos=(-0.35, 0.0, -0.05), command=self.__handleToon)
|
||||
toonText = DirectLabel(parent=self, relief=None, pos=Vec3(0.35, 0, -0.2), text=TTLocalizer.FriendInviterToonFriendInfo, text_fg=(0, 0, 0, 1), text_pos=(0, 0), text_scale=0.045, text_align=TextNode.ACenter)
|
||||
toonText.reparentTo(self.bToon.stateNodePath[2])
|
||||
self.bToon.hide()
|
||||
self.bPlayer = DirectButton(
|
||||
self,
|
||||
image = (buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr')),
|
||||
relief = None,
|
||||
text = TTLocalizer.FriendInviterPlayer,
|
||||
text_scale = 0.05, text_pos=(0.0, -0.1),
|
||||
pos = (0.0, 0.0, -0.05),
|
||||
command = self.__handlePlayer
|
||||
)
|
||||
playerText = DirectLabel(
|
||||
parent = self,
|
||||
relief = None,
|
||||
pos = Vec3(0, 0, -0.2),
|
||||
text = TTLocalizer.FriendInviterPlayerFriendInfo,
|
||||
text_fg = (0, 0, 0, 1),
|
||||
text_pos = (0, 0),
|
||||
text_scale = 0.045,
|
||||
text_align = TextNode.ACenter
|
||||
)
|
||||
self.bPlayer = DirectButton(self, image=(buttons.find('**/ChtBx_OKBtn_UP'), buttons.find('**/ChtBx_OKBtn_DN'), buttons.find('**/ChtBx_OKBtn_Rllvr')), relief=None, text=TTLocalizer.FriendInviterPlayer, text_scale=0.05, text_pos=(0.0, -0.1), pos=(0.0, 0.0, -0.05), command=self.__handlePlayer)
|
||||
playerText = DirectLabel(parent=self, relief=None, pos=Vec3(0, 0, -0.2), text=TTLocalizer.FriendInviterPlayerFriendInfo, text_fg=(0, 0, 0, 1), text_pos=(0, 0), text_scale=0.045, text_align=TextNode.ACenter)
|
||||
playerText.reparentTo(self.bPlayer.stateNodePath[2])
|
||||
self.bPlayer.hide()
|
||||
buttons.removeNode()
|
||||
|
|
@ -199,6 +112,7 @@ class FriendInviter(DirectFrame):
|
|||
self.fsm.request('getNewFriend')
|
||||
else:
|
||||
self.fsm.request('begin')
|
||||
return
|
||||
|
||||
def cleanup(self):
|
||||
self.fsm.request('cancel')
|
||||
|
|
@ -348,6 +262,7 @@ class FriendInviter(DirectFrame):
|
|||
self['text'] = OTPLocalizer.FriendInviterNotAvailable % self.getName()
|
||||
self.context = None
|
||||
self.bOk.show()
|
||||
return
|
||||
|
||||
def exitNotAvailable(self):
|
||||
self.bOk.hide()
|
||||
|
|
@ -356,6 +271,7 @@ class FriendInviter(DirectFrame):
|
|||
self['text'] = OTPLocalizer.FriendInviterFriendSaidNoNewFriends % self.getName()
|
||||
self.context = None
|
||||
self.bOk.show()
|
||||
return
|
||||
|
||||
def exitNotAcceptingFriends(self):
|
||||
self.bOk.hide()
|
||||
|
|
@ -367,6 +283,7 @@ class FriendInviter(DirectFrame):
|
|||
base.cr.friendManager.up_cancelFriendQuery(self.context)
|
||||
self.context = None
|
||||
self.bOk.show()
|
||||
return
|
||||
|
||||
def exitWentAway(self):
|
||||
self.bOk.hide()
|
||||
|
|
@ -387,6 +304,7 @@ class FriendInviter(DirectFrame):
|
|||
self.bCancel.setPos(0.2, 0.0, -0.1)
|
||||
self.bStop.show()
|
||||
self.bCancel.show()
|
||||
return
|
||||
|
||||
def exitAlready(self):
|
||||
self['text'] = ''
|
||||
|
|
@ -413,6 +331,7 @@ class FriendInviter(DirectFrame):
|
|||
self['text'] = OTPLocalizer.FriendInviterAskingMyPet % self.getName()
|
||||
self.context = None
|
||||
self.bOk.show()
|
||||
return
|
||||
|
||||
def exitAskingPet(self):
|
||||
self.bOk.hide()
|
||||
|
|
@ -429,6 +348,7 @@ class FriendInviter(DirectFrame):
|
|||
self.context = None
|
||||
self.bYes.show()
|
||||
self.bNo.show()
|
||||
return
|
||||
|
||||
def exitEndFriendship(self):
|
||||
self.bYes.hide()
|
||||
|
|
@ -453,6 +373,7 @@ class FriendInviter(DirectFrame):
|
|||
self['text'] = OTPLocalizer.FriendInviterSelf
|
||||
self.context = None
|
||||
self.bOk.show()
|
||||
return
|
||||
|
||||
def exitSelf(self):
|
||||
self.bOk.hide()
|
||||
|
|
@ -461,6 +382,7 @@ class FriendInviter(DirectFrame):
|
|||
self['text'] = OTPLocalizer.FriendInviterIgnored % self.toonName
|
||||
self.context = None
|
||||
self.bOk.show()
|
||||
return
|
||||
|
||||
def exitIgnored(self):
|
||||
self.bOk.hide()
|
||||
|
|
@ -480,6 +402,7 @@ class FriendInviter(DirectFrame):
|
|||
self['text'] = OTPLocalizer.FriendInviterFriendSaidYes % self.toonName
|
||||
self.context = None
|
||||
self.bOk.show()
|
||||
return
|
||||
|
||||
def exitYes(self):
|
||||
self.bOk.hide()
|
||||
|
|
@ -488,6 +411,7 @@ class FriendInviter(DirectFrame):
|
|||
self['text'] = OTPLocalizer.FriendInviterFriendSaidNo % self.toonName
|
||||
self.context = None
|
||||
self.bOk.show()
|
||||
return
|
||||
|
||||
def exitNo(self):
|
||||
self.bOk.hide()
|
||||
|
|
@ -496,6 +420,7 @@ class FriendInviter(DirectFrame):
|
|||
self['text'] = OTPLocalizer.FriendInviterOtherTooMany % self.toonName
|
||||
self.context = None
|
||||
self.bOk.show()
|
||||
return
|
||||
|
||||
def exitOtherTooMany(self):
|
||||
self.bOk.hide()
|
||||
|
|
@ -504,6 +429,7 @@ class FriendInviter(DirectFrame):
|
|||
self['text'] = OTPLocalizer.FriendInviterMaybe % self.toonName
|
||||
self.context = None
|
||||
self.bOk.show()
|
||||
return
|
||||
|
||||
def exitMaybe(self):
|
||||
self.bOk.hide()
|
||||
|
|
@ -512,6 +438,7 @@ class FriendInviter(DirectFrame):
|
|||
self['text'] = OTPLocalizer.FriendInviterDown
|
||||
self.context = None
|
||||
self.bOk.show()
|
||||
return
|
||||
|
||||
def exitDown(self):
|
||||
self.bOk.hide()
|
||||
|
|
@ -522,6 +449,7 @@ class FriendInviter(DirectFrame):
|
|||
base.cr.friendManager.up_cancelFriendQuery(self.context)
|
||||
self.context = None
|
||||
self.fsm.request('off')
|
||||
return
|
||||
|
||||
def exitCancel(self):
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -56,11 +56,13 @@ def showFriendsList():
|
|||
if globalFriendsList == None:
|
||||
globalFriendsList = FriendsListPanel()
|
||||
globalFriendsList.enter()
|
||||
return
|
||||
|
||||
|
||||
def hideFriendsList():
|
||||
if globalFriendsList != None:
|
||||
globalFriendsList.exit()
|
||||
return
|
||||
|
||||
|
||||
def showFriendsListTutorial():
|
||||
|
|
@ -72,6 +74,7 @@ def showFriendsListTutorial():
|
|||
globalFriendsList.secrets['state'] = DGG.DISABLED
|
||||
globalFriendsList.closeCommand = globalFriendsList.close['command']
|
||||
globalFriendsList.close['command'] = None
|
||||
return
|
||||
|
||||
|
||||
def hideFriendsListTutorial():
|
||||
|
|
@ -81,6 +84,7 @@ def hideFriendsListTutorial():
|
|||
if not base.cr.isPaid():
|
||||
globalFriendsList.secrets['state'] = DGG.NORMAL
|
||||
globalFriendsList.exit()
|
||||
return
|
||||
|
||||
|
||||
def isFriendsListShown():
|
||||
|
|
@ -94,6 +98,7 @@ def unloadFriendsList():
|
|||
if globalFriendsList != None:
|
||||
globalFriendsList.unload()
|
||||
globalFriendsList = None
|
||||
return
|
||||
|
||||
|
||||
class FriendsListPanel(DirectFrame, StateData.StateData):
|
||||
|
|
@ -130,6 +135,7 @@ class FriendsListPanel(DirectFrame, StateData.StateData):
|
|||
self.textDownColor = Vec4(0.5, 0.9, 1, 1)
|
||||
self.textDisabledColor = Vec4(0.4, 0.8, 0.4, 1)
|
||||
self.panelType = FLPOnline
|
||||
return
|
||||
|
||||
def load(self):
|
||||
if self.isLoaded == 1:
|
||||
|
|
@ -138,10 +144,9 @@ class FriendsListPanel(DirectFrame, StateData.StateData):
|
|||
gui = loader.loadModel('phase_3.5/models/gui/friendslist_gui')
|
||||
auxGui = loader.loadModel('phase_3.5/models/gui/avatar_panel_gui')
|
||||
self.title = DirectLabel(parent=self, relief=None, text='', text_scale=TTLocalizer.FLPtitle, text_fg=(0, 0.1, 0.4, 1), pos=(0.007, 0.0, 0.2))
|
||||
backgroundImage = gui.find('**/FriendsBox_Open')
|
||||
self['image'] = backgroundImage
|
||||
self.reparentTo(base.a2dTopRight)
|
||||
self.setPos(-0.233, 0, -0.46)
|
||||
background_image = gui.find('**/FriendsBox_Open')
|
||||
self['image'] = background_image
|
||||
self.setPos(1.1, 0, 0.54)
|
||||
self.scrollList = DirectScrolledList(parent=self, relief=None, incButton_image=(gui.find('**/FndsLst_ScrollUp'),
|
||||
gui.find('**/FndsLst_ScrollDN'),
|
||||
gui.find('**/FndsLst_ScrollUp_Rllvr'),
|
||||
|
|
@ -169,6 +174,7 @@ class FriendsListPanel(DirectFrame, StateData.StateData):
|
|||
''), text_scale=TTLocalizer.FLPsecrets, text_fg=(0, 0, 0, 1), text_bg=(1, 1, 1, 1), text_pos=(-0.04, -0.085), textMayChange=0, command=self.__secrets)
|
||||
gui.removeNode()
|
||||
auxGui.removeNode()
|
||||
return
|
||||
|
||||
def unload(self):
|
||||
if self.isLoaded == 0:
|
||||
|
|
@ -182,6 +188,7 @@ class FriendsListPanel(DirectFrame, StateData.StateData):
|
|||
del self.right
|
||||
del self.friends
|
||||
DirectFrame.destroy(self)
|
||||
return None
|
||||
|
||||
def makeFriendButton(self, friendTuple, colorChoice = None, bold = 0):
|
||||
playerName = None
|
||||
|
|
@ -322,6 +329,7 @@ class FriendsListPanel(DirectFrame, StateData.StateData):
|
|||
def __newFriend(self):
|
||||
messenger.send('wakeup')
|
||||
messenger.send('friendAvatar', [None, None, None])
|
||||
return
|
||||
|
||||
def __choseFriend(self, friendId, showType = 0):
|
||||
messenger.send('wakeup')
|
||||
|
|
@ -332,6 +340,7 @@ class FriendsListPanel(DirectFrame, StateData.StateData):
|
|||
if handle != None:
|
||||
self.notify.info("Clicked on name in friend's list. doId = %s" % handle.doId)
|
||||
messenger.send('clickedNametag', [handle])
|
||||
return
|
||||
|
||||
def __chosePlayerFriend(self, friendId, showType = 1):
|
||||
messenger.send('wakeup')
|
||||
|
|
@ -344,6 +353,7 @@ class FriendsListPanel(DirectFrame, StateData.StateData):
|
|||
if playerFriendInfo != None:
|
||||
self.notify.info("Clicked on name in player friend's list. Id = %s" % friendId)
|
||||
messenger.send('clickedNametagPlayer', [handle, friendId, showType])
|
||||
return
|
||||
|
||||
def __updateScrollList(self):
|
||||
newFriends = []
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class QuestChoiceGui(DirectFrame):
|
|||
notify = DirectNotifyGlobal.directNotify.newCategory('QuestChoiceGui')
|
||||
|
||||
def __init__(self):
|
||||
DirectFrame.__init__(self, relief=None, parent = base.a2dLeftCenter, geom=DGG.getDefaultDialogGeom(), geom_color=Vec4(0.8, 0.6, 0.4, 1), geom_scale=(1.85, 1, 0.9), geom_hpr=(0, 0, -90), pos=(.5, 0, 0))
|
||||
DirectFrame.__init__(self, relief=None, geom=DGG.getDefaultDialogGeom(), geom_color=Vec4(0.8, 0.6, 0.4, 1), geom_scale=(1.85, 1, 0.9), geom_hpr=(0, 0, -90), pos=(-0.85, 0, 0))
|
||||
self.initialiseoptions(QuestChoiceGui)
|
||||
self.questChoicePosters = []
|
||||
guiButton = loader.loadModel('phase_3/models/gui/quit_button')
|
||||
|
|
@ -21,6 +21,7 @@ class QuestChoiceGui(DirectFrame):
|
|||
self.timer.setScale(0.3)
|
||||
base.setCellsAvailable(base.leftCells, 0)
|
||||
base.setCellsAvailable([base.bottomCells[0], base.bottomCells[1]], 0)
|
||||
return
|
||||
|
||||
def setQuests(self, quests, fromNpcId, timeout):
|
||||
for i in range(0, len(quests), 3):
|
||||
|
|
|
|||
|
|
@ -57,22 +57,8 @@ class QuestMap(DirectFrame):
|
|||
self.marker['image'] = iconNP
|
||||
self.marker.setScale(0.05)
|
||||
iconNP.removeNode()
|
||||
self.mapOpenButton = DirectButton(
|
||||
image=(gui.find('**/tt_t_gui_qst_mapClose'), gui.find('**/tt_t_gui_qst_mapClose'), gui.find('**/tt_t_gui_qst_mapTryToOpen')),
|
||||
relief=None,
|
||||
parent = base.a2dBottomRight,
|
||||
pos=(-0.08, 0, 0.37),
|
||||
scale=0.205,
|
||||
command=self.show
|
||||
)
|
||||
self.mapCloseButton = DirectButton(
|
||||
image = (gui.find('**/tt_t_gui_qst_mapOpen'), gui.find('**/tt_t_gui_qst_mapOpen'), gui.find('**/tt_t_gui_qst_mapTryToClose')),
|
||||
relief = None,
|
||||
parent = base.a2dBottomRight,
|
||||
pos = (-0.08, 0, 0.37),
|
||||
scale = 0.205,
|
||||
command = self.hide
|
||||
)
|
||||
self.mapOpenButton = DirectButton(image=(gui.find('**/tt_t_gui_qst_mapClose'), gui.find('**/tt_t_gui_qst_mapClose'), gui.find('**/tt_t_gui_qst_mapTryToOpen')), relief=None, pos=(1.25, 0, -0.63), scale=0.205, command=self.show)
|
||||
self.mapCloseButton = DirectButton(image=(gui.find('**/tt_t_gui_qst_mapOpen'), gui.find('**/tt_t_gui_qst_mapOpen'), gui.find('**/tt_t_gui_qst_mapTryToClose')), relief=None, pos=(1.25, 0, -0.63), scale=0.205, command=self.hide)
|
||||
self.mapOpenButton.hide()
|
||||
self.mapCloseButton.hide()
|
||||
gui.removeNode()
|
||||
|
|
|
|||
|
|
@ -792,10 +792,12 @@ class KartShopGuiMgr(DirectObject.DirectObject, object):
|
|||
self.kartID = -1
|
||||
self.accID = -1
|
||||
self.timer = ToontownTimer.ToontownTimer()
|
||||
self.timer.reparentTo(aspect2d)
|
||||
self.timer.posInTopRightCorner()
|
||||
self.timer.accept('RESET_KARTSHOP_TIMER', self.__resetTimer)
|
||||
self.timer.countdown(KartShopGlobals.KARTCLERK_TIMER, self.__timerExpired)
|
||||
self.__doDialog(MENUS.MainMenu)
|
||||
return
|
||||
|
||||
def __resetTimer(self):
|
||||
if hasattr(self, 'timer') and self.timer:
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ from toontown.toonbase import ToontownGlobals
|
|||
from direct.showbase import DirectObject
|
||||
from direct.fsm import StateData
|
||||
from direct.gui.DirectGui import *
|
||||
from panda3d.core import *
|
||||
from toontown.toonbase import TTLocalizer
|
||||
from toontown.effects import DistributedFireworkShow
|
||||
from toontown.parties import DistributedPartyFireworksActivity
|
||||
|
|
@ -45,6 +46,7 @@ class ShtikerBook(DirectFrame, StateData.StateData):
|
|||
TTLocalizer.GolfPageTitle,
|
||||
TTLocalizer.EventsPageName,
|
||||
TTLocalizer.NewsPageName]
|
||||
return
|
||||
|
||||
def setSafeMode(self, setting):
|
||||
self.safeMode = setting
|
||||
|
|
@ -121,22 +123,8 @@ class ShtikerBook(DirectFrame, StateData.StateData):
|
|||
self['image'] = bookModel.find('**/big_book')
|
||||
self['image_scale'] = (2, 1, 1.5)
|
||||
self.resetFrameSize()
|
||||
self.bookOpenButton = DirectButton(
|
||||
image = (bookModel.find('**/BookIcon_CLSD'), bookModel.find('**/BookIcon_OPEN'), bookModel.find('**/BookIcon_RLVR')),
|
||||
relief = None,
|
||||
parent = base.a2dBottomRight,
|
||||
pos = (-0.158, 0, 0.17),
|
||||
scale = 0.305,
|
||||
command = self.__open
|
||||
)
|
||||
self.bookCloseButton = DirectButton(
|
||||
image = (bookModel.find('**/BookIcon_OPEN'), bookModel.find('**/BookIcon_CLSD'), bookModel.find('**/BookIcon_RLVR2')),
|
||||
relief = None,
|
||||
parent = base.a2dBottomRight,
|
||||
pos = (-0.158, 0, 0.17),
|
||||
scale = 0.305,
|
||||
command = self.__close
|
||||
)
|
||||
self.bookOpenButton = DirectButton(image=(bookModel.find('**/BookIcon_CLSD'), bookModel.find('**/BookIcon_OPEN'), bookModel.find('**/BookIcon_RLVR')), relief=None, pos=(1.175, 0, -0.83), scale=0.305, command=self.__open)
|
||||
self.bookCloseButton = DirectButton(image=(bookModel.find('**/BookIcon_OPEN'), bookModel.find('**/BookIcon_CLSD'), bookModel.find('**/BookIcon_RLVR2')), relief=None, pos=(1.175, 0, -0.83), scale=0.305, command=self.__close)
|
||||
self.bookOpenButton.hide()
|
||||
self.bookCloseButton.hide()
|
||||
self.nextArrow = DirectButton(parent=self, relief=None, image=(bookModel.find('**/arrow_button'), bookModel.find('**/arrow_down'), bookModel.find('**/arrow_rollover')), scale=(0.1, 0.1, 0.1), pos=(0.838, 0, -0.661), command=self.__pageChange, extraArgs=[1])
|
||||
|
|
@ -145,6 +133,7 @@ class ShtikerBook(DirectFrame, StateData.StateData):
|
|||
self.openSound = base.loader.loadSfx('phase_3.5/audio/sfx/GUI_stickerbook_open.ogg')
|
||||
self.closeSound = base.loader.loadSfx('phase_3.5/audio/sfx/GUI_stickerbook_delete.ogg')
|
||||
self.pageSound = base.loader.loadSfx('phase_3.5/audio/sfx/GUI_stickerbook_turn.ogg')
|
||||
return
|
||||
|
||||
def unload(self):
|
||||
loader.unloadModel('phase_3.5/models/gui/stickerbook_gui')
|
||||
|
|
@ -294,6 +283,7 @@ class ShtikerBook(DirectFrame, StateData.StateData):
|
|||
pageName,
|
||||
''), text_align=TextNode.ALeft, text_pos=(1, -0.2), text_scale=TTLocalizer.SBpageTab, text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), image=iconImage, image_scale=iconScale, geom=iconGeom, geom_scale=iconScale, geom_color=iconColor, pos=(0, 0, -yOffset), scale=0.06, command=buttonPressedCommand, extraArgs=extraArgs)
|
||||
self.pageTabs.insert(pageIndex, pageTab)
|
||||
return
|
||||
|
||||
def setPage(self, page, enterPage = True):
|
||||
if self.currPageIndex is not None:
|
||||
|
|
@ -306,6 +296,7 @@ class ShtikerBook(DirectFrame, StateData.StateData):
|
|||
from toontown.shtiker import NewsPage
|
||||
if not isinstance(page, NewsPage.NewsPage):
|
||||
self.pageBeforeNews = page
|
||||
return
|
||||
|
||||
def setPageBeforeNews(self, enterPage = True):
|
||||
self.setPage(self.pageBeforeNews, enterPage)
|
||||
|
|
@ -317,6 +308,7 @@ class ShtikerBook(DirectFrame, StateData.StateData):
|
|||
self.pageTabs[self.currPageTabIndex]['relief'] = DGG.RAISED
|
||||
self.currPageTabIndex = pageTabIndex
|
||||
self.pageTabs[self.currPageTabIndex]['relief'] = DGG.SUNKEN
|
||||
return
|
||||
|
||||
def isOnPage(self, page):
|
||||
result = False
|
||||
|
|
@ -446,6 +438,7 @@ class ShtikerBook(DirectFrame, StateData.StateData):
|
|||
def disableBookCloseButton(self):
|
||||
if self.bookCloseButton:
|
||||
self.bookCloseButton['command'] = None
|
||||
return
|
||||
|
||||
def enableBookCloseButton(self):
|
||||
if self.bookCloseButton:
|
||||
|
|
|
|||
|
|
@ -92,20 +92,7 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar):
|
|||
newScale = oldScale = 0.8
|
||||
if WantNewsPage:
|
||||
newScale = oldScale * ToontownGlobals.NewsPageScaleAdjust
|
||||
self.bFriendsList = DirectButton(
|
||||
image = (friendsButtonNormal, friendsButtonPressed, friendsButtonRollover),
|
||||
relief = None,
|
||||
parent = base.a2dTopRight,
|
||||
pos = (-0.141, 0, -0.125),
|
||||
scale = newScale,
|
||||
text = ('', TTLocalizer.FriendsListLabel, TTLocalizer.FriendsListLabel),
|
||||
text_scale = 0.09,
|
||||
text_fg = Vec4(1, 1, 1, 1),
|
||||
text_shadow = Vec4(0, 0, 0, 1),
|
||||
text_pos = (0, -0.18),
|
||||
text_font = ToontownGlobals.getInterfaceFont(),
|
||||
command = self.sendFriendsListEvent
|
||||
)
|
||||
self.bFriendsList = DirectButton(image=(friendsButtonNormal, friendsButtonPressed, friendsButtonRollover), relief=None, pos=(1.192, 0, 0.875), scale=newScale, text=('', TTLocalizer.FriendsListLabel, TTLocalizer.FriendsListLabel), text_scale=0.09, text_fg=Vec4(1, 1, 1, 1), text_shadow=Vec4(0, 0, 0, 1), text_pos=(0, -0.18), text_font=ToontownGlobals.getInterfaceFont(), command=self.sendFriendsListEvent)
|
||||
self.bFriendsList.hide()
|
||||
self.friendsListButtonActive = 0
|
||||
self.friendsListButtonObscured = 0
|
||||
|
|
@ -383,11 +370,10 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar):
|
|||
self.laffMeter = LaffMeter.LaffMeter(self.style, self.hp, self.maxHp)
|
||||
self.laffMeter.setAvatar(self)
|
||||
self.laffMeter.setScale(0.075)
|
||||
self.laffMeter.reparentTo(base.a2dBottomLeft)
|
||||
if self.style.getAnimal() == 'monkey':
|
||||
self.laffMeter.setPos(0.153, 0.0, 0.13)
|
||||
self.laffMeter.setPos(-1.18, 0.0, -0.87)
|
||||
else:
|
||||
self.laffMeter.setPos(0.133, 0.0, 0.13)
|
||||
self.laffMeter.setPos(-1.2, 0.0, -0.87)
|
||||
self.laffMeter.stop()
|
||||
self.questMap = QuestMap.QuestMap(self)
|
||||
self.questMap.stop()
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ def isZoneProtected(zoneId):
|
|||
lnames = TTLocalizer.NPCToonNames
|
||||
NPCToonDict = {20000: (-1,
|
||||
lnames[20000],
|
||||
('dls',
|
||||
('dll',
|
||||
'ms',
|
||||
'm',
|
||||
'm',
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ NametagReverse = False
|
|||
TTCISCspeedChat = 0.055
|
||||
TTCISCtopLevelOverlap = 0.0
|
||||
TCMnormalButton = 0.06
|
||||
TCMscButtonPos = (0.204, 0, -0.072)
|
||||
TCMscButtonPos = (-1.129, 0, 0.928)
|
||||
TCMscButton = 0.06
|
||||
TCMwhisperFrame = 0.06
|
||||
TCMwhisperButton = 0.05
|
||||
|
|
|
|||
|
|
@ -63,10 +63,10 @@ ConfigVariableDouble('decompressor-step-time').setValue(0.01)
|
|||
ConfigVariableDouble('extractor-step-time').setValue(0.01)
|
||||
backgroundNodePath = aspect2d.attachNewNode(backgroundNode, 0)
|
||||
backgroundNodePath.setPos(0.0, 0.0, 0.0)
|
||||
backgroundNodePath.setScale(base.aspect2d, VBase3(1.33, 1, 1))
|
||||
backgroundNodePath.setScale(aspect2d, VBase3(1.33, 1, 1))
|
||||
backgroundNodePath.find('**/fg').setBin('fixed', 20)
|
||||
backgroundNodePath.find('**/bg').setBin('fixed', 10)
|
||||
backgroundNodePath.find('**/bg').setScale(base.aspect2d, VBase3(base.getAspectRatio(), 1, 1))
|
||||
backgroundNodePath.find('**/bg').setScale(aspect2d, VBase3(base.getAspectRatio(), 1, 1))
|
||||
base.graphicsEngine.renderFrame()
|
||||
DirectGuiGlobals.setDefaultRolloverSound(base.loader.loadSfx('phase_3/audio/sfx/GUI_rollover.ogg'))
|
||||
DirectGuiGlobals.setDefaultClickSound(base.loader.loadSfx('phase_3/audio/sfx/GUI_create_toon_fwd.ogg'))
|
||||
|
|
@ -90,14 +90,7 @@ else:
|
|||
from direct.gui.DirectGui import OnscreenText
|
||||
serverVersion = ConfigVariableString('server-version', 'no_version_set').value
|
||||
print('ToontownStart: serverVersion: ', serverVersion)
|
||||
version = OnscreenText(
|
||||
serverVersion,
|
||||
parent = base.a2dBottomLeft,
|
||||
pos = (.033, .025),
|
||||
scale = 0.06,
|
||||
fg = Vec4(0, 0, 1, 0.6),
|
||||
align = TextNode.ALeft
|
||||
)
|
||||
version = OnscreenText(serverVersion, parent=base.a2dBottomLeft, pos=(0.033, 0.025), scale=0.06, fg=Vec4(0, 0, 1, 0.6), align=TextNode.ALeft)
|
||||
loader.beginBulkLoad('init', TTLocalizer.LoaderLabel, 138, 0, TTLocalizer.TIP_NONE)
|
||||
from toontown.distributed.ToontownClientRepository import ToontownClientRepository
|
||||
cr = ToontownClientRepository(serverVersion, launcher)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,3 @@ class ToontownTimer(OTPTimer):
|
|||
ToontownTimer.ClockImage = model.find('**/alarm_clock')
|
||||
model.removeNode()
|
||||
return ToontownTimer.ClockImage
|
||||
|
||||
def posInTopRightCorner(self):
|
||||
self.reparentTo(base.a2dTopRight)
|
||||
self.setPos(-.15, 0.0, -.16)
|
||||
|
|
@ -41,7 +41,6 @@ class ToontownLoadingScreen:
|
|||
self.waitBar.reparentTo(self.gui)
|
||||
self.title.reparentTo(self.gui)
|
||||
self.gui.reparentTo(aspect2dp, DGG.NO_FADE_SORT_INDEX)
|
||||
self.gui.find('**/bg').setScale(base.aspect2dp, VBase3(base.getAspectRatio(), 1, 1))
|
||||
else:
|
||||
self.waitBar.reparentTo(aspect2dp, DGG.NO_FADE_SORT_INDEX)
|
||||
self.title.reparentTo(aspect2dp, DGG.NO_FADE_SORT_INDEX)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ from toontown.toonbase.ToontownBattleGlobals import *
|
|||
import types
|
||||
from direct.fsm import StateData
|
||||
from direct.fsm import ClassicFSM, State
|
||||
from direct.fsm import State
|
||||
from . import TownBattleAttackPanel
|
||||
from . import TownBattleWaitPanel
|
||||
from . import TownBattleChooseAvatarPanel
|
||||
|
|
@ -129,8 +130,10 @@ class TownBattle(StateData.StateData):
|
|||
TownBattleToonPanel.TownBattleToonPanel(2),
|
||||
TownBattleToonPanel.TownBattleToonPanel(3))
|
||||
self.timer = ToontownTimer.ToontownTimer()
|
||||
self.timer.posInTopRightCorner()
|
||||
self.timer.setPos(1.182, 0, 0.842)
|
||||
self.timer.setScale(0.4)
|
||||
self.timer.hide()
|
||||
return
|
||||
|
||||
def cleanup(self):
|
||||
self.ignore(self.attackPanelDoneEvent)
|
||||
|
|
|
|||
Loading…
Reference in New Issue