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


Python ToontownGlobals.getSignFont方法代码示例

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


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

示例1: setupButtons

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
    def setupButtons(self):
        gui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui')
        arrowImage = (gui.find('**/tt_t_gui_mat_shuffleArrowUp'), gui.find('**/tt_t_gui_mat_shuffleArrowDown'))
        buttonImage = (gui.find('**/tt_t_gui_mat_shuffleUp'), gui.find('**/tt_t_gui_mat_shuffleDown'))

        self.title = DirectLabel(aspect2d, relief=None, text=TTLocalizer.GloveGuiTitle,
                     text_fg=(0, 1, 0, 1), text_scale=0.15, text_font=ToontownGlobals.getSignFont(),
                     pos=(0, 0, -0.30), text_shadow=(1, 1, 1, 1))

        self.notice = DirectLabel(aspect2d, relief=None, text='', text_fg=(1, 0, 0, 1), text_scale=0.11,
                      text_font=ToontownGlobals.getSignFont(), pos=(0, 0, -0.45), text_shadow=(1, 1, 1, 1))

        self.color = DirectLabel(aspect2d, relief=None, text='', text_scale=0.11, text_font=ToontownGlobals.getSignFont(),
                     pos=(0, 0, -0.70), text_shadow=(1, 1, 1, 1))

        self.buyButton = DirectButton(aspect2d, relief=None, image=buttonImage, text=TTLocalizer.GloveGuiBuy,
                         text_font=ToontownGlobals.getInterfaceFont(), text_scale=0.11, text_pos=(0, -0.02),
                         pos=(-0.60, 0, -0.90), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), command=self.__exit, extraArgs=[GloveNPCGlobals.CHANGE])

        self.cancelButton = DirectButton(aspect2d, relief=None, image=buttonImage, text=TTLocalizer.lCancel,
                            text_font=ToontownGlobals.getInterfaceFont(), text_scale=0.11, text_pos=(0, -0.02),
                            pos=(0.60, 0, -0.90), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), command=self.__exit, extraArgs=[GloveNPCGlobals.USER_CANCEL])

        self.downArrow = DirectButton(aspect2d, relief=None, image=arrowImage, pos=(-0.60, 0, -0.66))
        self.upArrow = DirectButton(aspect2d, relief=None, image=arrowImage, pos=(0.60, 0, -0.66), scale=-1)

        gui.removeNode()
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:29,代码来源:GloveShopGui.py

示例2: loadNextGameTimer

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
 def loadNextGameTimer(self):
     self.nextGame = DirectLabel(parent=self, relief=None, text='', text_font=ToontownGlobals.getSignFont(), text_scale=TTLocalizer.BCGnextGame * BG.CardImageScale[2], text_fg=(1.0, 1.0, 1.0, 1), pos=(BG.GridXOffset, 0, 4 * BG.CardImageScale[2]))
     self.nextGameTimer = ToontownTimer.ToontownTimer()
     self.nextGameTimer.reparentTo(self.nextGame)
     self.nextGameTimer.setPos(0, 0, -5 * BG.CardImageScale[2])
     self.nextGameTimer.setProp('image', None)
     self.nextGameTimer.setProp('text_font', ToontownGlobals.getSignFont())
     self.nextGameTimer.setProp('text_scale', 0.2 * BG.CardImageScale[2])
     self.nextGameTimer.setFontColor(Vec4(1.0, 1.0, 1.0, 1))
     return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:12,代码来源:BingoCardGui.py

示例3: enableRaceMode

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
    def enableRaceMode(self):
        self.enableSpeedometer()
        self.render2dRoot.show()
        self.raceModeRoot.show()
        self.maxLapHit = min(self.maxLapHit, self.race.lapCount - 1)
        for x in xrange(self.maxLapHit + 1):
            for y in self.timeLabels[x]:
                y.configure(text_font=ToontownGlobals.getSignFont())
                y.show()

        for y in self.timeLabels[self.maxLapHit]:
            y.configure(text_font=ToontownGlobals.getSignFont())
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:14,代码来源:RaceGUI.py

示例4: loadGUI

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
 def loadGUI(self):
     self.gui = loader.loadModel('phase_13/models/parties/trampolineGUI')
     self.gui.reparentTo(base.a2dTopLeft)
     self.gui.setPos(0.115, 0, -1)
     self.gui.hide()
     self.toonIndicator = self.gui.find('**/trampolineGUI_MovingBar')
     jumpLineLocator = self.gui.find('**/jumpLine_locator')
     guiBean = self.gui.find('**/trampolineGUI_GreenJellyBean')
     self.gui.find('**/trampolineGUI_GreenJellyBean').stash()
     self.guiBeans = [ guiBean.instanceUnderNode(jumpLineLocator, self.uniqueName('guiBean%d' % i)) for i in xrange(self.numJellyBeans) ]
     self.guiBeans[-1].setScale(1.5)
     heightTextNode = TextNode(self.uniqueName('TrampolineActivity.heightTextNode'))
     heightTextNode.setFont(ToontownGlobals.getSignFont())
     heightTextNode.setAlign(TextNode.ALeft)
     heightTextNode.setText('0.0')
     heightTextNode.setShadow(0.05, 0.05)
     heightTextNode.setShadowColor(0.0, 0.0, 0.0, 1.0)
     heightTextNode.setTextColor(1.0, 1.0, 1.0, 1.0)
     self.heightText = jumpLineLocator.attachNewNode(heightTextNode)
     self.heightText.setX(0.15)
     self.heightText.setScale(0.1)
     self.heightText.setAlphaScale(0.0)
     self.quitEarlyButtonModels = loader.loadModel('phase_3.5/models/gui/inventory_gui')
     quitEarlyUp = self.quitEarlyButtonModels.find('**//InventoryButtonUp')
     quitEarlyDown = self.quitEarlyButtonModels.find('**/InventoryButtonDown')
     quitEarlyRollover = self.quitEarlyButtonModels.find('**/InventoryButtonRollover')
     self.quitEarlyButton = DirectButton(parent=base.a2dTopRight, relief=None, text=TTLocalizer.PartyTrampolineQuitEarlyButton, text_fg=(1, 1, 0.65, 1), text_pos=(0, -0.23), text_scale=0.7, image=(quitEarlyUp, quitEarlyDown, quitEarlyRollover), image_color=(1, 0, 0, 1), image_scale=(20, 1, 11), pos=(-0.183, 0, -0.4), scale=0.09, command=self.leaveTrampoline)
     self.quitEarlyButton.stash()
     self.flashText = OnscreenText(text='', pos=(0.0, -0.45), scale=0.2, fg=(1.0, 1.0, 0.65, 1.0), align=TextNode.ACenter, font=ToontownGlobals.getSignFont(), mayChange=True)
     self.timer = PartyUtils.getNewToontownTimer()
     self.timer.posInTopRightCorner()
     return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:34,代码来源:DistributedPartyTrampolineActivity.py

示例5: flipText

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
 def flipText(flip, label = self.entryList[place - 1][3], timeStr = timeStr, recStr = TTLocalizer.KartRace_Record):
     self.entryList[place - 1][3].configure(text_scale=0.06)
     self.entryList[place - 1][3].configure(text_fg=(0.95, 0.0, 0.0, 1.0))
     if flip:
         self.entryList[place - 1][3].configure(text_font=DGG.getDefaultFont())
         self.entryList[place - 1][3]['text'] = timeStr
     else:
         self.entryList[place - 1][3].configure(text_font=ToontownGlobals.getSignFont())
         self.entryList[place - 1][3]['text'] = recStr
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:11,代码来源:RaceEndPanels.py

示例6: __initTallyDisplay

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
    def __initTallyDisplay(self):
        self.__tallyTextNode = TextNode('tally')
        self.__tallyTextNode.setFont(ToontownGlobals.getSignFont())
        self.__tallyTextNode.setAlign(TextNode.ACenter)
        self.tallyMarkers = [None] * self.__numRingGroups
        for i in xrange(0, self.__numRingGroups):
            self.__createTallyMarker(i, self.RT_UNKNOWN)

        return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:11,代码来源:DistributedRingGame.py

示例7: loadDnaStore

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
 def loadDnaStore(self):
     if not hasattr(self, 'dnaStore'):
         self.dnaStore = DNAStorage()
         files = ('phase_4/dna/storage.pdna', 'phase_3.5/dna/storage_interior.pdna')
         dnaBulk = DNABulkLoader(self.dnaStore, files)
         dnaBulk.loadDNAFiles()
         self.dnaStore.storeFont('humanist', ToontownGlobals.getInterfaceFont())
         self.dnaStore.storeFont('mickey', ToontownGlobals.getSignFont())
         self.dnaStore.storeFont('suit', ToontownGlobals.getSuitFont())
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:11,代码来源:PlayGame.py

示例8: doSpawnTitleText

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
 def doSpawnTitleText(self, text):
     self.titleColor = (1.0, 0.5, 0.4, 1.0)
     self.titleText = OnscreenText.OnscreenText(text, fg=self.titleColor, font=ToontownGlobals.getSignFont(), pos=(0, -0.5), scale=0.16, drawOrder=0, mayChange=1, wordwrap=16)
     self.titleText.setText(text)
     self.titleText.show()
     self.titleText.setColor(Vec4(*self.titleColor))
     self.titleText.clearColorScale()
     self.titleText.setFg(self.titleColor)
     seq = Sequence(Wait(0.1), Wait(6.0), self.titleText.colorScaleInterval(0.5, Vec4(1.0, 1.0, 1.0, 0.0)), Func(self.hideTitleText))
     seq.start()
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:12,代码来源:DistributedParty.py

示例9: startTimer

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
 def startTimer(self):
     self.clockNode = TextNode('elevatorClock')
     self.clockNode.setFont(ToontownGlobals.getSignFont())
     self.clockNode.setAlign(TextNode.ACenter)
     self.clockNode.setTextColor(0.5, 0.5, 0.5, 1)
     self.clockNode.setText(str(int(self.countdownDuration)))
     self.clock = aspect2d.attachNewNode(self.clockNode)
     self.clock.setPos(0, 0, -0.6)
     self.clock.setScale(0.15, 0.15, 0.15)
     self.__countdown(self.countdownDuration, self.__boardingElevatorTimerExpired)
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:12,代码来源:BoardingGroupShow.py

示例10: getSignTextNodes

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
 def getSignTextNodes(self, nodeName, font = ToontownGlobals.getSignFont()):
     signTextNode = TextNode(nodeName)
     signTextNode.setFont(font)
     signTextNode.setAlign(TextNode.ACenter)
     signTextNode.setTextColor(0.5, 0.5, 0.5, 1)
     signTextNodepath = self.tunnelSign.attachNewNode(signTextNode)
     signTextNodepath.setPos(0, 0.25, 0)
     signTextNodepath.setH(165.0)
     signTextNodepath.setDepthWrite(0)
     return (signTextNode, signTextNodepath)
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:12,代码来源:DistributedRacePad.py

示例11: startCountdownClock

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
 def startCountdownClock(self, countdownTime, ts):
     self.clockNode = TextNode("elevatorClock")
     self.clockNode.setFont(ToontownGlobals.getSignFont())
     self.clockNode.setAlign(TextNode.ACenter)
     self.clockNode.setTextColor(0.5, 0.5, 0.5, 1)
     self.clockNode.setText(str(int(countdownTime)))
     self.clock = self.getElevatorModel().attachNewNode(self.clockNode)
     self.clock.setPosHprScale(0, 2.0, 7.5, 0, 0, 0, 2.0, 2.0, 2.0)
     if ts < countdownTime:
         self.countdown(countdownTime - ts)
开发者ID:Wesley1000070,项目名称:Toontown-Crystal,代码行数:12,代码来源:DistributedElevator.py

示例12: __init__

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
 def __init__(self, doneEvent, kartNum):
     self.kartNum = kartNum
     self.modelScale = 1
     model = loader.loadModel('phase_6/models/gui/ConfirmBuyKartPanel')
     kartInfo = getKartTypeInfo(kartNum)
     name = kartInfo[KartInfo.name]
     cost = kartInfo[KartInfo.cost]
     DirectFrame.__init__(
         self,
         relief=None,
         state='normal',
         geom=model,
         geom_scale=self.modelScale,
         frameSize=(-1, 1, -1, 1),
         pos=(0, 0, -0.01),
         text=TTLocalizer.KartShop_ConfirmBuy % (name, cost),
         text_wordwrap=11,
         text_scale=KS_TEXT_SIZE_SMALL,
         text_pos=(0, -0.26))
     self.initialiseoptions(KartShopGuiMgr.ConfirmBuyKartDlg)
     self.ticketDisplay = DirectLabel(
         parent=self,
         relief=None,
         text=str(base.localAvatar.getTickets()),
         text_scale=KS_TEXT_SIZE_SMALL,
         text_fg=(0.95, 0.95, 0.0, 1.0),
         text_shadow=(0, 0, 0, 1),
         text_pos=(0.43, -0.5),
         text_font=ToontownGlobals.getSignFont())
     self.cancelButton = DirectButton(
         parent=self,
         relief=None,
         image=(model.find('**/CancelButtonUp'), model.find('**/CancelButtonDown'), model.find('**/CancelButtonRollover')),
         geom=model.find('**/CancelIcon'),
         scale=self.modelScale,
         pressEffect=False,
         command=lambda : messenger.send(doneEvent, [CBK_OPTIONS.Cancel]))
     self.okButton = DirectButton(
         parent=self,
         relief=None,
         image=(model.find('**/CheckButtonUp'), model.find('**/CheckButtonDown'), model.find('**/CheckButtonRollover')),
         geom=model.find('**/CheckIcon'),
         scale=self.modelScale,
         pressEffect=False,
         command=lambda : messenger.send(doneEvent, [CBK_OPTIONS.BuyKart]))
     self.kartView = KartViewer([self.kartNum, -1, -1, -1, -1, -1, -1, -1, -1], parent=self)
     self.kartView.setPos(model.find('**/KartViewerFrame').getPos())
     self.kartView.load(model, 'KartViewerFrame', [], [], None)
     self.kartView.setBounds(-0.38, 0.38, -.0425, 0.49)
     self.kartView.setBgColor(1.0, 1.0, 0.8, 1.0)
     self.initialize = True
     self.kartView.show()
     model.removeNode()
     return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:56,代码来源:KartShopGui.py

示例13: showDebugPointText

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
 def showDebugPointText(self, text, point):
     if not hasattr(self, 'debugText'):
         self.debugText = self.loader.geom.attachNewNode('debugText')
         self.debugTextNode = TextNode('debugTextNode')
         self.debugTextNode.setTextColor(1, 0, 0, 1)
         self.debugTextNode.setAlign(TextNode.ACenter)
         self.debugTextNode.setFont(ToontownGlobals.getSignFont())
     self.debugTextNode.setText(text)
     np = self.debugText.attachNewNode(self.debugTextNode.generate())
     np.setPos(point[0], point[1], point[2])
     np.setScale(4.0)
     np.setBillboardPointEye()
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:14,代码来源:Playground.py

示例14: enterWaitCountdown

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
 def enterWaitCountdown(self, ts):
     self.__enableCollisions()
     self.accept('trolleyExitButton', self.handleExitButton)
     self.clockNode = TextNode('trolleyClock')
     self.clockNode.setFont(ToontownGlobals.getSignFont())
     self.clockNode.setAlign(TextNode.ACenter)
     self.clockNode.setTextColor(0.9, 0.1, 0.1, 1)
     self.clockNode.setText('10')
     self.clock = self.golfKart.attachNewNode(self.clockNode)
     self.clock.setBillboardAxis()
     self.clock.setPosHprScale(0, -1, 7.0, -0.0, 0.0, 0.0, 2.0, 2.0, 2.0)
     if ts < self.trolleyCountdownTime:
         self.countdown(self.trolleyCountdownTime - ts)
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:15,代码来源:DistributedGolfKart.py

示例15: startCountdownClock

# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
 def startCountdownClock(self, countdownTime, ts):
     self.clockNode = TextNode('k')
     self.clockNode.setFont(ToontownGlobals.getSignFont())
     self.clockNode.setAlign(TextNode.ACenter)
     countdownInt = int(countdownTime)
     self.clockNode.setTextColor(self.getCountdownColor(countdownInt))
     self.clockNode.setText(str(countdownInt))
     self.clock = render2d.attachNewNode(self.clockNode)
     rs = TTLocalizer.DRrollScale
     self.clock.setPosHprScale(0, 0, 0, 0, 0, 0, rs, rs, rs)
     self.clock.hide()
     if ts < countdownTime:
         self.countdown(countdownTime - ts)
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:15,代码来源:DistributedRace.py


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