本文整理汇总了Python中src.toontown.toonbase.ToontownGlobals.getToonFont方法的典型用法代码示例。如果您正苦于以下问题:Python ToontownGlobals.getToonFont方法的具体用法?Python ToontownGlobals.getToonFont怎么用?Python ToontownGlobals.getToonFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类src.toontown.toonbase.ToontownGlobals
的用法示例。
在下文中一共展示了ToontownGlobals.getToonFont方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: knockKnockTrack
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
def knockKnockTrack(self, avatar, duration):
if avatar is None:
return
self.rimshot = base.loadSfx('phase_5/audio/sfx/AA_heal_telljoke.ogg')
self.knockSfx = base.loadSfx('phase_5/audio/sfx/GUI_knock_%s.ogg' % random.randint(1, 4))
joke = KnockKnockJokes[self.propId % len(KnockKnockJokes)]
place = base.cr.playGame.getPlace()
doorName = TTLocalizer.DoorNametag
self.nametag = None
self.nametagNP = None
doorNP = render.find('**/KnockKnockDoorSphere_' + str(self.propId) + ';+s')
if doorNP.isEmpty():
self.notify.warning('Could not find KnockKnockDoorSphere_%s' % self.propId)
return
self.nametag = NametagGroup()
self.nametag.setAvatar(doorNP)
self.nametag.setFont(ToontownGlobals.getToonFont())
self.nametag.setSpeechFont(ToontownGlobals.getToonFont())
self.nametag.setName(doorName)
self.nametag.setActive(0)
self.nametag.manage(base.marginManager)
self.nametag.getNametag3d().setBillboardOffset(4)
nametagNode = self.nametag.getNametag3d()
self.nametagNP = render.attachNewNode(nametagNode)
self.nametagNP.setName('knockKnockDoor_nt_' + str(self.propId))
pos = doorNP.getBounds().getCenter()
self.nametagNP.setPos(pos + Vec3(0, 0, avatar.getHeight() + 2))
d = duration * 0.125
track = Sequence(Parallel(Sequence(Wait(d * 0.5), SoundInterval(self.knockSfx)), Func(self.nametag.setChat, TTLocalizer.DoorKnockKnock, CFSpeech), Wait(d)), Func(avatar.setChatAbsolute, TTLocalizer.DoorWhosThere, CFSpeech | CFTimeout, openEnded=0), Wait(d), Func(self.nametag.setChat, joke[0], CFSpeech), Wait(d), Func(avatar.setChatAbsolute, joke[0] + TTLocalizer.DoorWhoAppendix, CFSpeech | CFTimeout, openEnded=0), Wait(d), Func(self.nametag.setChat, joke[1], CFSpeech))
if avatar == base.localAvatar:
track.append(Func(self.sendUpdate, 'requestToonup'))
track.append(Parallel(SoundInterval(self.rimshot, startTime=2.0), Wait(d * 4)))
track.append(Func(self.cleanupTrack))
track.delayDelete = DelayDelete.DelayDelete(avatar, 'knockKnockTrack')
return track
示例2: buildFrame
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
def buildFrame(self, name, dnaTuple):
frame = loader.loadModel('phase_3.5/models/modules/trophy_frame')
dna = ToonDNA.ToonDNA()
apply(dna.newToonFromProperties, dnaTuple)
head = ToonHead.ToonHead()
head.setupHead(dna)
head.setPosHprScale(0, -0.05, -0.05, 180, 0, 0, 0.55, 0.02, 0.55)
if dna.head[0] == 'r':
head.setZ(-0.15)
elif dna.head[0] == 'h':
head.setZ(0.05)
elif dna.head[0] == 'm':
head.setScale(0.45, 0.02, 0.45)
head.reparentTo(frame)
nameText = TextNode('trophy')
nameText.setFont(ToontownGlobals.getToonFont())
nameText.setAlign(TextNode.ACenter)
nameText.setTextColor(0, 0, 0, 1)
nameText.setWordwrap(5.36 * FrameScale)
nameText.setText(name)
namePath = frame.attachNewNode(nameText.generate())
namePath.setPos(0, -0.03, -.6)
namePath.setScale(0.186 / FrameScale)
frame.setScale(FrameScale, 1.0, FrameScale)
return frame
示例3: _createPartyEditorPage
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
def _createPartyEditorPage(self):
page = DirectFrame(self.frame)
page.setName('PartyPlannerEditorPage')
self.LayoutTitleLabel = DirectLabel(parent=page, relief=None, text=TTLocalizer.PartyPlannerEditorTitle, pos=self.gui.find('**/title_locator').getPos() + Point3(0.0, 0.0, 0.075), scale=self.titleScale)
self.costLabel = DirectLabel(parent=page, pos=(-0.74, 0.0, 0.17), relief=None, text=TTLocalizer.PartyPlannerTotalCost % 0, text_align=TextNode.ACenter, scale=TTLocalizer.PPcostLabel, textMayChange=True)
self.partyGridBackground = DirectFrame(parent=page, relief=None, geom=self.gui.find('**/partyGrid_flat'))
self.partyGroundsLabel = DirectLabel(parent=page, relief=None, text=TTLocalizer.PartyPlannerPartyGrounds, text_font=ToontownGlobals.getSignFont(), text_fg=VBase4(1.0, 0.0, 0.0, 1.0), text_scale=TTLocalizer.PPpartyGroundsLabel, pos=self.gui.find('**/step_05_partyGrounds_text_locator').getPos(), scale=0.1)
self.activityBackground = DirectFrame(parent=page, relief=None, geom=self.gui.find('**/activitiesDecorations_flat1'), pos=(0.0, 0.0, 0.04))
pos = self.gui.find('**/step_05_instructions_locator').getPos()
self.instructionLabel = DirectLabel(parent=page, relief=None, text=' ', text_pos=(pos[0], pos[2]), text_scale=TTLocalizer.PPinstructionLabel, textMayChange=True, geom=self.gui.find('**/instructions_flat'))
self.elementTitleLabel = DirectLabel(parent=page, relief=None, text=' ', pos=self.gui.find('**/step_05_activitiesName_text_locator').getPos() + Point3(0.0, 0.0, 0.04), text_scale=TTLocalizer.PPelementTitleLabel, textMayChange=True)
self.elementPriceNode = TextNode('ElementPrice')
self.elementPriceNode.setAlign(TextNode.ALeft)
self.elementPriceNode.setTextColor(0.0, 0.0, 0.0, 1.0)
self.elementPriceNode.setFont(ToontownGlobals.getToonFont())
self.elementPrice = page.attachNewNode(self.elementPriceNode)
self.elementPrice.setScale(TTLocalizer.PPelementPriceNode)
self.elementPrice.setPos(self.gui.find('**/step_05_activityPrice_text_locator').getPos() + Point3(-0.02, 0.0, 0.04))
self.elementDescriptionNode = TextNode('ElementDescription')
self.elementDescriptionNode.setAlign(TextNode.ACenter)
self.elementDescriptionNode.setWordwrap(8)
self.elementDescriptionNode.setFont(ToontownGlobals.getToonFont())
self.elementDescriptionNode.setTextColor(0.0, 0.0, 0.0, 1.0)
self.elementDescription = page.attachNewNode(self.elementDescriptionNode)
self.elementDescription.setScale(TTLocalizer.PPelementDescription)
self.elementDescription.setPos(self.gui.find('**/step_05_activityDescription_text_locator').getPos() + Point3(0.0, 0.0, 0.04))
self.totalMoney = base.localAvatar.getTotalMoney()
catalogGui = loader.loadModel('phase_5.5/models/gui/catalog_gui')
self.beanBank = DirectLabel(parent=page, relief=None, text=str(self.totalMoney), text_align=TextNode.ARight, text_scale=0.075, text_fg=(0.95, 0.95, 0, 1), text_shadow=(0, 0, 0, 1), text_pos=(0.495, -0.53), text_font=ToontownGlobals.getSignFont(), textMayChange=True, image=catalogGui.find('**/bean_bank'), image_scale=(0.65, 0.65, 0.65), scale=0.9, pos=(-0.75, 0.0, 0.6))
catalogGui.removeNode()
del catalogGui
self.accept(localAvatar.uniqueName('moneyChange'), self.__moneyChange)
self.accept(localAvatar.uniqueName('bankMoneyChange'), self.__moneyChange)
self.partyEditor = PartyEditor(self, page)
self.partyEditor.request('Hidden')
pos = self.gui.find('**/step_05_add_text_locator').getPos()
self.elementBuyButton = DirectButton(parent=page, relief=None, text=TTLocalizer.PartyPlannerBuy, text_pos=(pos[0], pos[2]), text_scale=TTLocalizer.PPelementBuyButton, geom=(self.gui.find('**/add_up'), self.gui.find('**/add_down'), self.gui.find('**/add_rollover')), geom3_color=VBase4(0.5, 0.5, 0.5, 1.0), textMayChange=True, pos=(0.0, 0.0, 0.04), command=self.partyEditor.buyCurrentElement)
self.okWithPartyGroundsLayoutEvent = 'okWithPartyGroundsLayoutEvent'
self.accept(self.okWithPartyGroundsLayoutEvent, self.okWithPartyGroundsLayout)
self.okWithGroundsGui = TTDialog.TTGlobalDialog(dialogName=self.uniqueName('PartyEditorOkGui'), doneEvent=self.okWithPartyGroundsLayoutEvent, message=TTLocalizer.PartyPlannerOkWithGroundsLayout, style=TTDialog.YesNo, okButtonText=OTPLocalizer.DialogYes, cancelButtonText=OTPLocalizer.DialogNo)
self.okWithGroundsGui.doneStatus = ''
self.okWithGroundsGui.hide()
return page
示例4: makeTextNodes
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
def makeTextNodes(self):
self.notify.debugStateCall(self)
self.trackNameNode, trackNameNodePath = self.getSignTextNodes('trackNameNode')
trackNameNodePath.setZ(0.7)
trackNameNodePath.setScale(0.875)
trackNameNodePath.flattenLight()
self.trackTypeNode, trackTypeNodePath = self.getSignTextNodes('trackTypeNode')
trackTypeNodePath.setZ(-0.35)
trackTypeNodePath.setScale(0.875)
trackTypeNodePath.flattenLight()
self.depositNode, depositNodePath = self.getSignTextNodes('depositNode', ToontownGlobals.getToonFont())
self.depositNode.setTextColor(0, 0, 0, 1)
depositNodePath.setPos(4.0, -1.0, -2.0)
depositNodePath.setScale(0.75)
depositNodePath.flattenLight()
self.qualifyNode, qualifyNodePath = self.getSignTextNodes('qualifyNode', ToontownGlobals.getToonFont())
self.qualifyNode.setTextColor(0, 0, 0, 1)
qualifyNodePath.setPos(-4.0, 1.2, -2.0)
qualifyNodePath.setScale(0.75)
qualifyNodePath.flattenLight()
示例5: __createNametag
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
def __createNametag(self, parent):
if self.nametagGroup == None:
self.nametagGroup = NametagGroup()
self.nametagGroup.setFont(ToontownGlobals.getToonFont())
self.nametagGroup.setSpeechFont(ToontownGlobals.getToonFont())
self.nametagGroup.setActive(0)
self.nametagGroup.setAvatar(self.partyPlannerHead)
self.nametagGroup.manage(base.marginManager)
self.nametagGroup.setColorCode(self.nametagGroup.CCNonPlayer)
self.nametagGroup.getNametag2d().setContents(0)
self.nametagNode = NametagFloat2d()
self.nametagNode.setContents(Nametag.CName)
self.nametagGroup.addNametag(self.nametagNode)
self.nametagGroup.setName(base.cr.partyManager.getPartyPlannerName())
self.nametagNP = parent.attachNewNode(self.nametagNode)
nametagPos = self.gui.find('**/step_01_partymanPeteNametag_locator').getPos()
self.nametagNP.setPosHprScale(nametagPos[0], 0, nametagPos[2], 0, 0, 0, 0.1, 1, 0.1)
self.chatNode = NametagFloat2d()
self.chatNode.setContents(Nametag.CSpeech | Nametag.CThought)
self.nametagGroup.addNametag(self.chatNode)
self.nametagGroup.setChat(TTLocalizer.PartyPlannerInstructions, CFSpeech)
self.chatNP = parent.attachNewNode(self.chatNode)
chatPos = self.gui.find('**/step_01_partymanPeteText_locator').getPos()
self.chatNP.setPosHprScale(chatPos[0], 0, chatPos[2], 0, 0, 0, 0.08, 1, 0.08)
示例6: load
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
def load(self):
from src.toontown.toonbase import ToontownGlobals
from pandac.PandaModules import TextNode
textNode = TextNode('moviedialogue')
textNode.setTextColor(0, 0, 0, 1)
textNode.setCardColor(1, 1, 1, 1)
textNode.setCardAsMargin(0, 0, 0, 0)
textNode.setCardDecal(True)
textNode.setWordwrap(27.0)
textNode.setAlign(TextNode.ACenter)
textNode.setFont(ToontownGlobals.getToonFont())
self._dialogueLabel = aspect2d.attachNewNode(textNode)
self._dialogueLabel.setScale(0.06, 0.06, 0.06)
self._dialogueLabel.setPos(0.32, 0, -0.75)
self._dialogueLabel.reparentTo(hidden)
示例7: __setupName
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
def __setupName(self):
DistributedMailbox.notify.debug('__setupName')
if self.nameText:
self.nameText.removeNode()
self.nameText = None
nameOrigin = self.model.find('**/nameLocator')
if not nameOrigin.isEmpty():
text = TextNode('nameText')
text.setTextColor(*self.nameColor)
text.setAlign(TextNode.ACenter)
text.setFont(ToontownGlobals.getToonFont())
text.setWordwrap(7.5)
text.setText(self.name)
self.nameText = nameOrigin.attachNewNode(text)
self.nameText.setH(90)
self.nameText.setScale(0.2)
return
示例8: makeFriendButton
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
def makeFriendButton(self, avId, color):
handle = base.cr.identifyFriend(avId)
if not handle:
base.cr.fillUpFriendsMap()
return
return DirectButton(
relief=None,
text=handle.getName(),
text_scale=0.04,
text_align=TextNode.ALeft,
text_fg=color,
text_shadow=None,
text1_bg=self.textDownColor,
text2_bg=self.textRolloverColor,
text3_fg=self.textDisabledColor,
text_font=ToontownGlobals.getToonFont(),
textMayChange=0,
command=self.__choseFriend,
extraArgs=[avId])
示例9: getFont
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
def getFont(self):
return ToontownGlobals.getToonFont()
示例10: _initModel
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
def _initModel(self, type='joke_card'):
self._countLabel = DirectLabel(parent=self, relief=None, pos=(0.0625, 0, -0.025), scale=CogdoGameConsts.MemoGuiTextScale, text=str(0), text_fg=CogdoGameConsts.MemoGuiTextColor, text_shadow=(0.2, 0.2, 0.2, 1), text_align=TextNode.ALeft, text_font=ToontownGlobals.getToonFont())
self._memoIcon = CogdoUtil.loadModel(type, game='shared', group='gui')
self._memoIcon.reparentTo(self)
self._memoIcon.setScale(MEMOICON_SCALE)
return
示例11: load
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
def load(self):
self.gui = loader.loadModel('phase_3.5/models/gui/friendslist_gui')
self.listXorigin = -0.5
self.listFrameSizeX = 1.5
self.listZorigin = -0.9
self.listFrameSizeZ = 1.04
self.arrowButtonScale = 1.3
self.itemFrameXorigin = -0.237
self.itemFrameZorigin = 0.365
self.labelXstart = self.itemFrameXorigin + 0.293
self.scrollList = DirectScrolledList(parent=self, relief=None, pos=(0, 0, 0), incButton_image=(self.gui.find('**/FndsLst_ScrollUp'),
self.gui.find('**/FndsLst_ScrollDN'),
self.gui.find('**/FndsLst_ScrollUp_Rllvr'),
self.gui.find('**/FndsLst_ScrollUp')), incButton_relief=None, incButton_scale=(self.arrowButtonScale, self.arrowButtonScale, -self.arrowButtonScale), incButton_pos=(self.labelXstart, 0, self.itemFrameZorigin - 0.999), incButton_image3_color=Vec4(1, 1, 1, 0.2), decButton_image=(self.gui.find('**/FndsLst_ScrollUp'),
self.gui.find('**/FndsLst_ScrollDN'),
self.gui.find('**/FndsLst_ScrollUp_Rllvr'),
self.gui.find('**/FndsLst_ScrollUp')), decButton_relief=None, decButton_scale=(self.arrowButtonScale, self.arrowButtonScale, self.arrowButtonScale), decButton_pos=(self.labelXstart, 0, self.itemFrameZorigin + 0.227), decButton_image3_color=Vec4(1, 1, 1, 0.2), itemFrame_pos=(self.itemFrameXorigin, 0, self.itemFrameZorigin), itemFrame_scale=1.0, itemFrame_relief=DGG.SUNKEN, itemFrame_frameSize=(self.listXorigin,
self.listXorigin + self.listFrameSizeX,
self.listZorigin,
self.listZorigin + self.listFrameSizeZ), itemFrame_frameColor=(0.85, 0.95, 1, 1), itemFrame_borderWidth=(0.01, 0.01), numItemsVisible=12, forceHeight=0.083, items=[])
for courseId in GolfGlobals.CourseInfo:
courseName = GolfGlobals.getCourseName(courseId)
frame = DirectFrame(parent=self.scrollList, relief=None)
courseNameDisplay = DirectLabel(parent=frame, relief=None, pos=(-0.475, 0, 0.05), text=courseName, text_align=TextNode.ALeft, text_scale=0.075, text_fg=(0.85, 0.64, 0.13, 1.0), text_shadow=(0, 0, 0, 1), text_font=ToontownGlobals.getSignFont())
bestScoreDisplay = DirectLabel(parent=frame, relief=None, pos=(0.9, 0, 0.05), text=TTLocalizer.KartRace_Unraced, text_scale=0.06, text_fg=(0.0, 0.0, 0.0, 1.0), text_font=ToontownGlobals.getToonFont())
self.bestDisplayList.append(bestScoreDisplay)
self.scrollList.addItem(frame)
for holeId in GolfGlobals.HoleInfo:
holeName = GolfGlobals.getHoleName(holeId)
frame = DirectFrame(parent=self.scrollList, relief=None)
holeNameDisplay = DirectLabel(parent=frame, relief=None, pos=(-0.475, 0, 0.05), text=holeName, text_align=TextNode.ALeft, text_scale=0.075, text_fg=(0.95, 0.95, 0.0, 1.0), text_shadow=(0, 0, 0, 1), text_font=ToontownGlobals.getSignFont())
bestScoreDisplay = DirectLabel(parent=frame, relief=None, pos=(0.9, 0, 0.05), text=TTLocalizer.KartRace_Unraced, text_scale=0.06, text_fg=(0.0, 0.0, 0.0, 1.0), text_font=ToontownGlobals.getToonFont())
self.bestDisplayList.append(bestScoreDisplay)
self.scrollList.addItem(frame)
return
示例12: __init__
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
def __init__(self, av = None, position = 0):
DirectButton.__init__(self, relief=None, text='', text_font=ToontownGlobals.getSignFont())
self.initialiseoptions(AvatarChoice)
self.mode = None
if not av:
self.mode = AvatarChoice.MODE_CREATE
self.name = ''
self.dna = None
else:
self.mode = AvatarChoice.MODE_CHOOSE
self.name = av.name
self.dna = ToonDNA.ToonDNA(av.dna)
self.wantName = av.wantName
self.approvedName = av.approvedName
self.rejectedName = av.rejectedName
self.allowedName = av.allowedName
self.position = position
self.doneEvent = 'avChoicePanel-' + str(self.position)
self.deleteWithPasswordFrame = None
self.pickAToonGui = loader.loadModel('phase_3/models/gui/tt_m_gui_pat_mainGui')
self.buttonBgs = []
self.buttonBgs.append(self.pickAToonGui.find('**/tt_t_gui_pat_squareRed'))
self.buttonBgs.append(self.pickAToonGui.find('**/tt_t_gui_pat_squareGreen'))
self.buttonBgs.append(self.pickAToonGui.find('**/tt_t_gui_pat_squarePurple'))
self.buttonBgs.append(self.pickAToonGui.find('**/tt_t_gui_pat_squareBlue'))
self.buttonBgs.append(self.pickAToonGui.find('**/tt_t_gui_pat_squarePink'))
self.buttonBgs.append(self.pickAToonGui.find('**/tt_t_gui_pat_squareYellow'))
self['image'] = self.buttonBgs[position]
self.setScale(1.01)
if self.mode is AvatarChoice.MODE_CREATE:
self['command'] = self.__handleCreate
self['text'] = (TTLocalizer.AvatarChoiceMakeAToon,)
self['text_pos'] = (0, 0)
self['text0_scale'] = 0.1
self['text1_scale'] = TTLocalizer.ACmakeAToon
self['text2_scale'] = TTLocalizer.ACmakeAToon
self['text0_fg'] = (0, 1, 0.8, 0.5)
self['text1_fg'] = (0, 1, 0.8, 1)
self['text2_fg'] = (0.3, 1, 0.9, 1)
else:
self['command'] = self.__handleChoice
self['text'] = ('', TTLocalizer.AvatarChoicePlayThisToon, TTLocalizer.AvatarChoicePlayThisToon)
self['text_scale'] = TTLocalizer.ACplayThisToon
self['text_fg'] = (1, 0.9, 0.1, 1)
self.nameText = DirectLabel(parent=self, relief=None, scale=0.08, pos=NAME_POSITIONS[position], text=self.name, hpr=(0, 0, NAME_ROTATIONS[position]), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), text_wordwrap=8, text_font=ToontownGlobals.getToonFont(), state=DGG.DISABLED)
if self.approvedName != '':
self.nameText['text'] = self.approvedName
guiButton = loader.loadModel('phase_3/models/gui/quit_button')
self.nameYourToonButton = DirectButton(parent=self, relief=None, image=(guiButton.find('**/QuitBtn_UP'), guiButton.find('**/QuitBtn_DN'), guiButton.find('**/QuitBtn_RLVR')), text=(TTLocalizer.AvatarChoiceNameYourToon, TTLocalizer.AvatarChoiceNameYourToon, TTLocalizer.AvatarChoiceNameYourToon), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), text_scale=0.15, text_pos=(0, 0.03), text_font=ToontownGlobals.getInterfaceFont(), pos=(-0.2, 0, -0.3), scale=0.45, image_scale=(2, 1, 3), command=self.__handleCreate)
guiButton.removeNode()
self.statusText = DirectLabel(parent=self, relief=None, scale=0.09, pos=(0, 0, -0.24), text='', text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), text_wordwrap=7.5, text_scale=TTLocalizer.ACstatusText, text_font=ToontownGlobals.getToonFont(), state=DGG.DISABLED)
if self.wantName != '':
self.nameYourToonButton.hide()
self.statusText['text'] = TTLocalizer.AvatarChoiceNameReview
elif self.approvedName != '':
self.nameYourToonButton.hide()
self.statusText['text'] = TTLocalizer.AvatarChoiceNameApproved
elif self.rejectedName != '':
self.nameYourToonButton.hide()
self.statusText['text'] = TTLocalizer.AvatarChoiceNameRejected
elif self.allowedName == 1:
self.nameYourToonButton.show()
self.statusText['text'] = ''
else:
self.nameYourToonButton.hide()
self.statusText['text'] = ''
self.head = hidden.attachNewNode('head')
self.head.setPosHprScale(0, 5, -0.1, 180, 0, 0, 0.24, 0.24, 0.24)
self.head.reparentTo(self.stateNodePath[0], 20)
self.head.instanceTo(self.stateNodePath[1], 20)
self.head.instanceTo(self.stateNodePath[2], 20)
self.headModel = ToonHead.ToonHead()
self.headModel.setupHead(self.dna, forGui=1)
self.headModel.reparentTo(self.head)
animalStyle = self.dna.getAnimal()
bodyScale = ToontownGlobals.toonBodyScales[animalStyle]
self.headModel.setScale(bodyScale / 0.75)
self.headModel.startBlink()
self.headModel.startLookAround()
trashcanGui = loader.loadModel('phase_3/models/gui/trashcan_gui')
self.deleteButton = DirectButton(parent=self, image=(trashcanGui.find('**/TrashCan_CLSD'), trashcanGui.find('**/TrashCan_OPEN'), trashcanGui.find('**/TrashCan_RLVR')), text=('', TTLocalizer.AvatarChoiceDelete, TTLocalizer.AvatarChoiceDelete), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), text_scale=0.15, text_pos=(0, -0.1), text_font=ToontownGlobals.getInterfaceFont(), relief=None, pos=DELETE_POSITIONS[position], scale=0.45, command=self.__handleDelete)
trashcanGui.removeNode()
self.resetFrameSize()
self.avForLogging = None
if av:
self.avForLogging = str(av.id)
else:
self.avForLogging = None
return