当前位置: 首页>>代码示例>>Python>>正文


Python ToontownGlobals.getToonFont方法代码示例

本文整理汇总了Python中toontown.toonbase.ToontownGlobals.getToonFont方法的典型用法代码示例。如果您正苦于以下问题:Python ToontownGlobals.getToonFont方法的具体用法?Python ToontownGlobals.getToonFont怎么用?Python ToontownGlobals.getToonFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在toontown.toonbase.ToontownGlobals的用法示例。


在下文中一共展示了ToontownGlobals.getToonFont方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __createNametag

# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from 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)
     return
开发者ID:AdrianF98,项目名称:Toontown-Rewritten,代码行数:27,代码来源:PartyPlanner.py

示例2: knockKnockTrack

# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from 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
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:50,代码来源:DistributedKnockKnockDoor.py

示例3: __init__

# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
 def __init__(self):
     DirectFrame.__init__(self, frameColor=(.3, .2, .6, 1), frameSize=(.4, -1.2, .8, -.8))
     self.initialiseoptions(CustomStatePanel)
     
     self._font = ToontownGlobals.getToonFont()
     gui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_nameShop')
     self.squareUp = gui.find('**/tt_t_gui_mat_namePanelSquareUp')
     self.squareDown = gui.find('**/tt_t_gui_mat_namePanelSquareDown')
     self.squareHover = gui.find('**/tt_t_gui_mat_namePanelSquareHover')
     
     self.title = OnscreenText(parent=self, text=T_TITLE, pos=(-.4, .7), scale=.085, font=self._font)
     self.screen1 = self.attachNewNode('screen1')
     
     self.__hood = -1        
     self.__trackChoice = [-1, -1]
     
     DirectButton(parent=self.screen1, text_scale=.075, text=T_HELP, pos=(-.4, 0, .6), relief=None, text_font=self._font, 
                  image=(self.squareUp, self.squareDown, self.squareHover, self.squareUp), text_pos=(0, -.02), command=self.__help)
     DirectButton(parent=self.screen1, scale=.075, text=T_TTC, pos=(-.8, 0, .45), relief=None, text_font=self._font,
                  command=self.__hoodChosen, extraArgs=[0])
     DirectButton(parent=self.screen1, scale=.075, text=T_DD, pos=(0, 0, .45), relief=None, text_font=self._font,
                  command=self.__hoodChosen, extraArgs=[1])
     DirectButton(parent=self.screen1, scale=.075, text=T_DG, pos=(-.8 if config.GetBool('csp-want-mm', False) else -.4, 0, -.2), relief=None, text_font=self._font,
                  command=self.__hoodChosen, extraArgs=[2])
     if config.GetBool('csp-want-mm', False):
         DirectButton(parent=self.screen1, scale=.075, text=T_MM, pos=(0, 0, -.2), relief=None, text_font=self._font,
                      command=self.__hoodChosen, extraArgs=[3])
开发者ID:Teku16,项目名称:MikeyTheRepository,代码行数:29,代码来源:CustomStatePanel.py

示例4: makeFriendButton

# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
 def makeFriendButton(self, friendTuple, colorChoice = None, bold = 0):
     avId, flags = friendTuple
     command = self.__choseFriend
     handle = base.cr.identifyFriend(avId)
     if handle:
         toonName = handle.getName()
     else:
         base.cr.fillUpFriendsMap()
         return
     fg = ToontownGlobals.ColorNoChat
     if flags & ToontownGlobals.FriendChat:
         fg = ToontownGlobals.ColorAvatar
     if colorChoice:
         fg = colorChoice
     fontChoice = ToontownGlobals.getToonFont()
     fontScale = 0.04
     bg = None
     if colorChoice and bold:
         fontScale = 0.04
         colorS = 0.7
         bg = (colorChoice[0] * colorS,
          colorChoice[1] * colorS,
          colorChoice[2] * colorS,
          colorChoice[3])
     db = DirectButton(relief=None, text=toonName, text_scale=fontScale, text_align=TextNode.ALeft, text_fg=fg, text_shadow=bg, text1_bg=self.textDownColor, text2_bg=self.textRolloverColor, text3_fg=self.textDisabledColor, text_font=fontChoice, textMayChange=0, command=command, extraArgs=[avId])
     return db
开发者ID:Teku16,项目名称:Toontown-Crystal-Master,代码行数:28,代码来源:FriendsListPanel.py

示例5: knockKnockTrack

# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
 def knockKnockTrack(self, avatar, duration):
     if avatar == None:
         return
     self.rimshot = base.loadSfx('phase_5/audio/sfx/AA_heal_telljoke.ogg')
     self.knockSfx = base.loadSfx('phase_5/audio/sfx/GUI_knock_3.ogg')
     joke = KnockKnockJokes[self.propId % len(KnockKnockJokes)]
     place = base.cr.playGame.getPlace()
     doorName = TTLocalizer.DoorNametag
     if place:
         zone = place.getZoneId()
         branch = ZoneUtil.getBranchZone(zone)
     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.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.node().getSolid(0).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), Parallel(SoundInterval(self.rimshot, startTime=2.0), Wait(d * 4)), Func(self.cleanupTrack))
     track.delayDelete = DelayDelete.DelayDelete(avatar, 'knockKnockTrack')
     return track
开发者ID:gamerdave54321,项目名称:Toontown-House-Code,代码行数:35,代码来源:DistributedKnockKnockDoor.py

示例6: __init__

# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
 def __init__(self):
     self.__expectedCount = 0
     self.__count = 0
     self.screen = loader.loadModel('phase_3/models/gui/progress-background')
     self.gui = self.screen.find('**/bg')
     self.banner = loader.loadModel('phase_3.5/models/gui/stickerbook_gui').find('**/paper_note')
     self.banner.reparentTo(self.gui)
     self.banner.setScale(1.15, 1.0, 1.0)
     self.banner.setZ(-0.13)
     
     self.tip = DirectLabel(guiId='ToontownLoadingScreenTip', parent = self.banner, relief = None,
                              text='', text_scale = TTLocalizer.TLStip, textMayChange = 1, pos=(-0.41, 0.0, 0.235),
                              text_fg = (0.4, 0.3, 0.2, 1), text_wordwrap = 9, text_align = TextNode.ALeft)
                              
     self.title = DirectLabel(guiId = 'ToontownLoadingScreenTitle', parent = self.gui, relief = None,
                              pos = (-1.06, 0, -0.77), text = '', textMayChange = 1, text_scale = 0.08,
                              text_fg = (1, .9, 0, 1), text_align = TextNode.ALeft,
                              text_font = ToontownGlobals.getToonFont())
                              
     self.waitBar = DirectWaitBar(guiId = 'ToontownLoadingScreenWaitBar', parent = self.gui,
                                  frameSize = (-1.06, 1.06, -0.03, 0.03), pos = (0, 0, -0.85),
                                  text = '')
                                  
     self.logo = OnscreenImage('phase_3/maps/toontown-logo.png')
     self.logo.reparentTo(self.gui)
     self.logo.setScale(self.gui, (0.53,1,0.35))
     self.logo.setTransparency(TransparencyAttrib.MAlpha)
     self.logo.setZ(0.73)
开发者ID:ToontownModder101,项目名称:Toontown-Offline-Squirting-Flower-Modded-,代码行数:30,代码来源:ToontownLoadingScreenALT-WITH-TIPS.py

示例7: buildFrame

# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from 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.050000000000000003, -0.050000000000000003, 180, 0, 0, 0.55000000000000004, 0.02, 0.55000000000000004)
     if dna.head[0] == 'r':
         head.setZ(-0.14999999999999999)
     elif dna.head[0] == 'h':
         head.setZ(0.050000000000000003)
     elif dna.head[0] == 'm':
         head.setScale(0.45000000000000001, 0.02, 0.45000000000000001)
     
     head.reparentTo(frame)
     nameText = TextNode('trophy')
     nameText.setFont(ToontownGlobals.getToonFont())
     nameText.setAlign(TextNode.ACenter)
     nameText.setTextColor(0, 0, 0, 1)
     nameText.setWordwrap(5.3600000000000003 * FrameScale)
     nameText.setText(name)
     namePath = frame.attachNewNode(nameText.generate())
     namePath.setPos(0, -0.029999999999999999, -0.59999999999999998)
     namePath.setScale(0.186 / FrameScale)
     frame.setScale(FrameScale, 1.0, FrameScale)
     return frame
开发者ID:ponyboy837,项目名称:Toontown-2003-Server,代码行数:28,代码来源:DistributedToonInterior.py

示例8: buildFrame

# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from 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, -0.6)
     namePath.setScale(0.186 / FrameScale)
     frame.setScale(FrameScale, 1.0, FrameScale)
     return frame
开发者ID:nguoy-tk,项目名称:src,代码行数:27,代码来源:DistributedToonInterior.py

示例9: getPicture

# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
 def getPicture(self, avatar):
     frame = self.makeFrame()
     if self.nametagStyle == 100:
         inFont = ToontownGlobals.getToonFont()
     else:
         inFont = ToontownGlobals.getNametagFont(self.nametagStyle)
     nameTagDemo = DirectLabel(parent=frame, relief=None, pos=(0, 0, 0.24), scale=0.5, text=localAvatar.getName(), text_fg=(1.0, 1.0, 1.0, 1), text_shadow=(0, 0, 0, 1), text_font=inFont, text_wordwrap=9)
     self.hasPicture = True
     return (frame, None)
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:11,代码来源:CatalogNametagItem.py

示例10: updateBuyButton

# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
 def updateBuyButton(self):
     if not self.loaded:
         return
     if not base.cr.isPaid():
         self.buyButton['command'] = self.getTeaserPanel()
     self.buyButton.show()
     typeCode = self['item'].getTypeCode()
     orderCount = base.localAvatar.onOrder.count(self['item'])
     if orderCount > 0:
         if orderCount > 1:
             auxText = '%d %s' % (orderCount, TTLocalizer.CatalogOnOrderText)
         else:
             auxText = TTLocalizer.CatalogOnOrderText
     else:
         auxText = ''
     isNameTag = typeCode == CatalogItemTypes.NAMETAG_ITEM
     if isNameTag and not localAvatar.getGameAccess() == OTPGlobals.AccessFull:
         if self['item'].nametagStyle == 100:
             if localAvatar.getFont() == ToontownGlobals.getToonFont():
                 auxText = TTLocalizer.CatalogCurrent
                 self.buyButton['state'] = DGG.DISABLED
         elif self['item'].getPrice(self['type']) > base.localAvatar.getMoney() + base.localAvatar.getBankMoney():
             self.buyButton['state'] = DGG.DISABLED
     elif isNameTag and self['item'].nametagStyle == localAvatar.getNametagStyle():
         auxText = TTLocalizer.CatalogCurrent
         self.buyButton['state'] = DGG.DISABLED
     elif self['item'].reachedPurchaseLimit(base.localAvatar):
         max = self['item'].getPurchaseLimit()
         if max <= 1:
             auxText = TTLocalizer.CatalogPurchasedText
             if self['item'].hasBeenGifted(base.localAvatar):
                 auxText = TTLocalizer.CatalogGiftedText
         else:
             auxText = TTLocalizer.CatalogPurchasedMaxText
         self.buyButton['state'] = DGG.DISABLED
     elif hasattr(self['item'], 'noGarden') and self['item'].noGarden(base.localAvatar):
         auxText = TTLocalizer.NoGarden
         self.buyButton['state'] = DGG.DISABLED
     elif hasattr(self['item'], 'isSkillTooLow') and self['item'].isSkillTooLow(base.localAvatar):
         auxText = TTLocalizer.SkillTooLow
         self.buyButton['state'] = DGG.DISABLED
     elif hasattr(self['item'], 'getDaysToGo') and self['item'].getDaysToGo(base.localAvatar):
         auxText = TTLocalizer.DaysToGo % self['item'].getDaysToGo(base.localAvatar)
         self.buyButton['state'] = DGG.DISABLED
     elif self['item'].getEmblemPrices() and not base.localAvatar.isEnoughMoneyAndEmblemsToBuy(self['item'].getPrice(self['type']), self['item'].getEmblemPrices()):
         self.buyButton['state'] = DGG.DISABLED
     elif self['item'].__class__.__name__ == "CatalogHouseItem" and self['item'].houseId == localAvatar.houseType:
         auxText = TTLocalizer.CatalogPurchasedMaxText
         self.buyButton['state'] = DGG.DISABLED
     elif self['item'].getPrice(self['type']) <= base.localAvatar.getMoney() + base.localAvatar.getBankMoney():
         self.buyButton['state'] = DGG.NORMAL
         self.buyButton.show()
     else:
         self.buyButton['state'] = DGG.DISABLED
         self.buyButton.show()
     self.auxText['text'] = auxText
开发者ID:vincent15k,项目名称:Toontown-House,代码行数:58,代码来源:CatalogItemPanel.py

示例11: _createPartyEditorPage

# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from 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
开发者ID:BmanGames,项目名称:Toontown-Level-Editor,代码行数:45,代码来源:PartyPlanner.py

示例12: getFontByName

# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
 def getFontByName(self, fontname):
     if fontname == "toon":
         return ToontownGlobals.getToonFont()
     elif fontname == "building":
         return ToontownGlobals.getBuildingNametagFont()
     elif fontname == "minnie":
         return ToontownGlobals.getMinnieFont()
     elif fontname == "suit":
         return ToontownGlobals.getSuitFont()
     else:
         return MagicWordManager.MagicWordManager.getFontByName(self, fontname)
开发者ID:BmanGames,项目名称:Toontown-Level-Editor,代码行数:13,代码来源:ToontownMagicWordManager.py

示例13: load

# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
 def load(self):
     self.setPos(-0.5,0,-0.115)
     self.jbs = OnscreenText(text='0',font=ToontownGlobals.getToonFont(),parent=self)
     self.jbs.node().setTextColor(1,1,0,1)
     self.jbs.node().setShadowColor(0,0,0,1)
     self.jbs.node().setShadow(0.1,0.1)
     self.jbs.setScale(0.1)
     self.icon = loader.loadModel('phase_4/models/minigames/jellyBean')
     self.icon.reparentTo(self)
     self.icon.setScale(0.1)
     self.icon.setPos(-.090,0,0.010)
开发者ID:Kawaiikat14,项目名称:Toontown-2-Revised,代码行数:13,代码来源:SurfersGUI.py

示例14: makeTextNodes

# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from 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()
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:22,代码来源:DistributedRacePad.py

示例15: prepare

# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getToonFont [as 别名]
 def prepare(self):
     font1 = ToontownGlobals.getToonFont()
     slideUpTextNd = TextNode('slideUpText')
     slideUpTextNd.setFont(font1)
     slideUpTextNd.setTextColor(255,255,255,1)
     slideUpTextNd.setShadowColor(0,0,0,1)
     slideUpTextNd.setShadow(0.1,0.1)
     self.slideUpText = self.parent.attachNewNode(slideUpTextNd)
     self.slideUpText.setPos(self.SUTextX,0,self.SUTextZ)
     self.slideUpText.setScale(0)
     self.slideUpText.setR(-10)
     self.slideUpText.hide()
开发者ID:Kawaiikat14,项目名称:Toontown-2-Revised,代码行数:14,代码来源:SurfersGUI.py


注:本文中的toontown.toonbase.ToontownGlobals.getToonFont方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。