本文整理汇总了Python中toontown.toonbase.ToontownGlobals.getSignFont方法的典型用法代码示例。如果您正苦于以下问题:Python ToontownGlobals.getSignFont方法的具体用法?Python ToontownGlobals.getSignFont怎么用?Python ToontownGlobals.getSignFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.toonbase.ToontownGlobals
的用法示例。
在下文中一共展示了ToontownGlobals.getSignFont方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setupButtons
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from 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()
示例2: createGui
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
def createGui(self):
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=TTLocalizer.GloveGuiNotice % ToontownGlobals.GloveCost,
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=(self.shuffleUp, self.shuffleDown),
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.handleBuy)
self.cancelButton = DirectButton(aspect2d, relief=None, image=(self.shuffleUp, self.shuffleDown),
text=TTLocalizer.GloveGuiCancel, 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.leave)
self.leftButton = DirectButton(aspect2d, relief=None, image=(self.shuffleArrowUp, self.shuffleArrowDown),
pos=(-0.60, 0, -0.66), command=self.handleSetIndex, extraArgs=[-1])
self.rightButton = DirectButton(aspect2d, relief=None, image=(self.shuffleArrowUp, self.shuffleArrowDown),
pos=(0.60, 0, -0.66), scale=-1, command=self.handleSetIndex, extraArgs=[1])
self.updateGuiByIndex()
示例3: loadGUI
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from 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 range(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
示例4: loadNextGameTimer
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from 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
示例5: enableRaceMode
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from 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())
示例6: showHitScore
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
def showHitScore(self, number, scale = 1):
if number <= 0:
return
if self.hpText:
self.hideHitScore()
self.HpTextGenerator.setFont(ToontownGlobals.getSignFont())
if number < 0:
self.HpTextGenerator.setText(str(number))
else:
self.HpTextGenerator.setText('+' + str(number))
self.HpTextGenerator.clearShadow()
self.HpTextGenerator.setAlign(TextNode.ACenter)
r = 1
g = 1
b = 0
a = 1
self.HpTextGenerator.setTextColor(r, g, b, a)
self.hpTextNode = self.HpTextGenerator.generate()
self.hpText = render.attachNewNode(self.hpTextNode)
self.hpText.setScale(scale)
self.hpText.setBillboardPointEye()
self.hpText.setBin('fixed', 100)
self.hpText.setPos(self.root, 0, 0, self.height / 2)
seq = Sequence(self.hpText.posInterval(0.25, Point3(self.root.getX(render), self.root.getY(render), self.root.getZ(render) + self.height + 1.0), blendType='easeOut'), Wait(0.25), self.hpText.colorInterval(0.1, Vec4(r, g, b, 0)), Func(self.__hideHitScore))
seq.start()
示例7: __init__
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
def __init__(self):
self.__expectedCount = 0
self.__count = 0
self.gui = loader.loadModel('phase_3/models/gui/progress-background')
self.banner = loader.loadModel('phase_3/models/gui/toon_council').find('**/scroll')
self.banner.reparentTo(self.gui)
self.banner.setScale(0.4, 0.4, 0.4)
self.tip = DirectLabel(guiId='ToontownLoadingScreenTip', parent=self.banner, relief=None, text='', text_scale=TTLocalizer.TLStip, textMayChange=1, pos=(-1.2, 0.0, 0.1), text_fg=(0.4, 0.3, 0.2, 1), text_wordwrap=13, 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=(0, 0, 0.5, 1), text_align=TextNode.ALeft)
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.5625))
self.logo.setTransparency(TransparencyAttrib.MAlpha)
self.logo.setZ(0.73)
self.airplane = loader.loadModel('phase_4/models/props/airplane.bam')
self.airplane.setScale(4)
self.airplane.setPos(0, 0, 1)
self.banner = self.airplane.find('**/*banner')
bannerText = TextNode('bannerText')
bannerText.setTextColor(1, 0, 0, 1)
bannerText.setAlign(bannerText.ACenter)
bannerText.setFont(ToontownGlobals.getSignFont())
bannerText.setText('Cog invasion!!!')
self.bn = self.banner.attachNewNode(bannerText.generate())
self.bn.setHpr(180, 0, 0)
self.bn.setPos(-1.8, 0.1, 0)
self.bn.setScale(0.35)
self.banner.hide()
return
示例8: __init__
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
def __init__(self, cr):
DistributedMinigame.__init__(self, cr)
self.gameFSM = ClassicFSM.ClassicFSM(
"DistributedCogThiefGame",
[
State.State("off", self.enterOff, self.exitOff, ["play"]),
State.State("play", self.enterPlay, self.exitPlay, ["cleanup"]),
State.State("cleanup", self.enterCleanup, self.exitCleanup, []),
],
"off",
"cleanup",
)
self.addChildGameFSM(self.gameFSM)
self.cameraTopView = (0, 0, 55, 0, -90.0, 0)
self.barrels = []
self.cogInfo = {}
self.lastTimeControlPressed = 0
self.stolenBarrels = []
self.useOrthoWalk = base.config.GetBool("cog-thief-ortho", 1)
self.resultIval = None
self.gameIsEnding = False
self.__textGen = TextNode("cogThiefGame")
self.__textGen.setFont(ToontownGlobals.getSignFont())
self.__textGen.setAlign(TextNode.ACenter)
return
示例9: flipText
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from 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
示例10: showHitScore
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
def showHitScore(self, number, scale = 1):
if number <= 0:
return
if self.hpText:
self.hideHitScore()
self.HpTextGenerator.setFont(ToontownGlobals.getSignFont())
if number < 0:
self.HpTextGenerator.setText(str(number))
else:
self.HpTextGenerator.setText('+' + str(number))
self.HpTextGenerator.clearShadow()
self.HpTextGenerator.setAlign(TextNode.ACenter)
r = 1
g = 1
b = 0
a = 1
self.HpTextGenerator.setTextColor(r, g, b, a)
self.hpTextNode = self.HpTextGenerator.generate()
self.hpText = render.attachNewNode(self.hpTextNode)
self.hpText.setScale(scale)
self.hpText.setBillboardPointEye()
self.hpText.setBin('fixed', 100)
self.hpText.setPos(self.root, 0, 0, self.height / 2)
seq = Task.sequence(self.hpText.lerpPos(Point3(self.root.getX(render), self.root.getY(render), self.root.getZ(render) + self.height + 1.0), 0.25, blendType='easeOut'), Task.pause(0.25), self.hpText.lerpColor(Vec4(r, g, b, a), Vec4(r, g, b, 0), 0.1), Task.Task(self.__hideHitScoreTask))
taskMgr.add(seq, 'PartyCogHpText' + str(self.id))
示例11: loadGUI
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
def loadGUI(self):
self.gui = loader.loadModel('phase_13/models/parties/trampolineGUI')
self.gui.setX(-1.15)
self.gui.reparentTo(self.screenPlaneElements)
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 range(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=self.screenPlaneElements, 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=(1.15, 0, 0.6), 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.reparentTo(self.screenPlaneElements)
return
示例12: doSpawnTitleText
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
def doSpawnTitleText(self, text):
return
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)),
Task(self.hideTitleText),
)
seq.start()
示例13: __init__
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
def __init__(self, beanAmount):
if not ScavengerHuntEffect.images:
ScavengerHuntEffect.images = loader.loadModel('phase_4/models/props/tot_jar')
self.npRoot = DirectFrame(parent=aspect2d, relief=None, scale=0.75, pos=(0, 0, 0.6))
if beanAmount > 0:
self.npRoot.setColorScale(VBase4(1, 1, 1, 0))
self.jar = DirectFrame(parent=self.npRoot, relief=None, image=ScavengerHuntEffect.images.find('**/tot_jar'))
self.jar.hide()
self.eventImage = NodePath('EventImage')
self.eventImage.reparentTo(self.npRoot)
self.countLabel = DirectLabel(parent=self.jar, relief=None, text='+0', text_pos=(0.02, -0.2), text_scale=0.25, text_fg=(0.95,
0.0,
0,
1), text_font=ToontownGlobals.getSignFont())
def countUp(t, startVal, endVal):
beanCountStr = startVal + t * (endVal - startVal)
self.countLabel['text'] = '+' + `(int(beanCountStr))`
def setCountColor(color):
self.countLabel['text_fg'] = color
self.track = Sequence(LerpColorScaleInterval(self.npRoot, 1, colorScale=VBase4(1, 1, 1, 1), startColorScale=VBase4(1, 1, 1, 0)), Wait(1), Func(self.jar.show), LerpColorScaleInterval(self.eventImage, 1, colorScale=VBase4(1, 1, 1, 0), startColorScale=VBase4(1, 1, 1, 1)), Parallel(LerpScaleInterval(self.npRoot, 1, scale=0.5, startScale=0.75), LerpPosInterval(self.npRoot, 1, pos=VBase3(-0.9, 0, -0.83))), LerpFunc(countUp, duration=2, extraArgs=[0, beanAmount]), Func(setCountColor, VBase4(0.95, 0.95, 0, 1)), Wait(3), Func(self.destroy))
else:
self.npRoot.setColorScale(VBase4(1, 1, 1, 0))
self.attemptFailedMsg()
self.track = Sequence(LerpColorScaleInterval(self.npRoot, 1, colorScale=VBase4(1, 1, 1, 1), startColorScale=VBase4(1, 1, 1, 0)), Wait(5), LerpColorScaleInterval(self.npRoot, 1, colorScale=VBase4(1, 1, 1, 0), startColorScale=VBase4(1, 1, 1, 1)), Func(self.destroy))
示例14: load
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
def load(self, purchaseModels=None):
if purchaseModels == None:
purchaseModels = loader.loadModel("phase_4/models/gui/purchase_gui")
self.music = base.loadMusic("phase_4/audio/bgm/FF_safezone.mid")
self.jarImage = purchaseModels.find("**/Jar")
self.jarImage.reparentTo(hidden)
self.frame = DirectFrame(relief=None)
self.frame.hide()
self.title = DirectLabel(
parent=self.frame,
relief=None,
pos=(0.0, 0.0, 0.82999999999999996),
scale=1.2,
image=purchaseModels.find("**/Goofys_Sign"),
text=TTLocalizer.GagShopName,
text_fg=(0.59999999999999998, 0.20000000000000001, 0, 1),
text_scale=0.089999999999999997,
text_wordwrap=10,
text_pos=(0, 0.025000000000000001, 0),
text_font=ToontownGlobals.getSignFont(),
)
self.pointDisplay = DirectLabel(
parent=self.frame,
relief=None,
pos=(-1.1499999999999999, 0.0, 0.16),
text=str(self.toon.getMoney()),
text_scale=0.20000000000000001,
text_fg=(0.94999999999999996, 0.94999999999999996, 0, 1),
text_shadow=(0, 0, 0, 1),
text_pos=(0, -0.10000000000000001, 0),
image=self.jarImage,
text_font=ToontownGlobals.getSignFont(),
)
self.statusLabel = DirectLabel(
parent=self.frame,
relief=None,
pos=(-0.25, 0, 0.625),
text=TTLocalizer.GagShopYouHave % self.toon.getMoney(),
text_scale=TTLocalizer.PBstatusLabel,
text_fg=(0.050000000000000003, 0.14000000000000001, 0.40000000000000002, 1),
)
if self.toon.getMoney() == 1:
self.statusLabel["text"] = TTLocalizer.GagShopYouHaveOne
self.isBroke = 0
self._teaserPanel = None
示例15: _DistributedRingGame__initTallyDisplay
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSignFont [as 别名]
def _DistributedRingGame__initTallyDisplay(self):
self._DistributedRingGame__tallyTextNode = TextNode('tally')
self._DistributedRingGame__tallyTextNode.setFont(ToontownGlobals.getSignFont())
self._DistributedRingGame__tallyTextNode.setAlign(TextNode.ACenter)
self.tallyMarkers = [
None] * self._DistributedRingGame__numRingGroups
for i in range(0, self._DistributedRingGame__numRingGroups):
self._DistributedRingGame__createTallyMarker(i, self.RT_UNKNOWN)