本文整理汇总了Python中toontown.toonbase.ToontownGlobals.getInterfaceFont方法的典型用法代码示例。如果您正苦于以下问题:Python ToontownGlobals.getInterfaceFont方法的具体用法?Python ToontownGlobals.getInterfaceFont怎么用?Python ToontownGlobals.getInterfaceFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.toonbase.ToontownGlobals
的用法示例。
在下文中一共展示了ToontownGlobals.getInterfaceFont方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createGui
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getInterfaceFont [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()
示例2: load
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
def load(self):
gui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui')
guiBoyUp = gui.find('**/tt_t_gui_mat_boyUp')
guiBoyDown = gui.find('**/tt_t_gui_mat_boyDown')
guiGirlUp = gui.find('**/tt_t_gui_mat_girlUp')
guiGirlDown = gui.find('**/tt_t_gui_mat_girlDown')
self.boyButton = DirectButton(relief=None, image=(guiBoyUp,
guiBoyDown,
guiBoyUp,
guiBoyDown), image_scale=halfButtonScale, image1_scale=halfButtonHoverScale, image2_scale=halfButtonHoverScale, pos=(-0.4, 0, -0.8), command=self.createRandomBoy, text=('',
TTLocalizer.GenderShopBoyButtonText,
TTLocalizer.GenderShopBoyButtonText,
''), text_font=ToontownGlobals.getInterfaceFont(), text_scale=0.08, text_pos=(0, 0.19), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1))
self.boyButton.hide()
self.girlButton = DirectButton(relief=None, image=(guiGirlUp,
guiGirlDown,
guiGirlUp,
guiGirlDown), image_scale=halfButtonScale, image1_scale=halfButtonHoverScale, image2_scale=halfButtonHoverScale, pos=(0.4, 0, -0.8), command=self.createRandomGirl, text=('',
TTLocalizer.GenderShopGirlButtonText,
TTLocalizer.GenderShopGirlButtonText,
''), text_font=ToontownGlobals.getInterfaceFont(), text_scale=0.08, text_pos=(0, 0.19), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1))
self.girlButton.hide()
gui.removeNode()
del gui
self.toon = None
return
示例3: setupButtons
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getInterfaceFont [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()
示例4: __init__
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
def __init__(self):
DirectObject.__init__(self)
FSM.__init__(self, self.__class__.__name__)
self.label = OnscreenText(
'', parent=hidden, font=ToontownGlobals.getMinnieFont(),
fg=Vec4(1, 1, 1, 1), scale=0.06, align=TextNode.ACenter,
wordwrap=35)
self.label.setColorScale(Vec4(0, 0, 0, 0))
gui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui.bam')
shuffleUp = gui.find('**/tt_t_gui_mat_shuffleUp')
shuffleDown = gui.find('**/tt_t_gui_mat_shuffleDown')
okUp = gui.find('**/tt_t_gui_mat_okUp')
okDown = gui.find('**/tt_t_gui_mat_okDown')
closeUp = gui.find('**/tt_t_gui_mat_closeUp')
closeDown = gui.find('**/tt_t_gui_mat_closeDown')
gui.removeNode()
del gui
self.exitButton = DirectButton(
parent=hidden, relief=None,
image=(shuffleUp, shuffleDown, shuffleUp),
image_scale=(0.6, 0.6, 0.6), image1_scale=(0.63, 0.6, 0.6),
image2_scale=(0.63, 0.6, 0.6),
text=(TTLocalizer.IntroExitButton, TTLocalizer.IntroExitButton,
TTLocalizer.IntroExitButton, ''),
text_font=ToontownGlobals.getInterfaceFont(),
text_scale=TTLocalizer.SBshuffleBtn, text_pos=(0, -0.02),
text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1))
self.yesButton = DirectButton(
parent=hidden, relief=None, image=(okUp, okDown, okUp, okDown),
image_scale=(0.6, 0.6, 0.6), image1_scale=(0.7, 0.7, 0.7),
image2_scale=(0.7, 0.7, 0.7),
text=('', TTLocalizer.IntroYesButton, TTLocalizer.IntroYesButton),
text_font=ToontownGlobals.getInterfaceFont(), text_scale=0.08,
text_align=TextNode.ACenter, text_pos=(0, -0.175),
text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1))
self.noButton = DirectButton(
parent=hidden, relief=None,
image=(closeUp, closeDown, closeUp, closeDown),
image_scale=(0.6, 0.6, 0.6), image1_scale=(0.7, 0.7, 0.7),
image2_scale=(0.7, 0.7, 0.7),
text=('', TTLocalizer.IntroNoButton, TTLocalizer.IntroNoButton),
text_font=ToontownGlobals.getInterfaceFont(), text_scale=0.08,
text_align=TextNode.ACenter, text_pos=(0, -0.175),
text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1))
self.disclaimerTrack = None
self.presentsTrack = None
示例5: __init__
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
def __init__(self, genus = None, itemIndex = 0, *extraArgs):
fishingGui = loader.loadModel('phase_3.5/models/gui/fishingBook')
albumGui = fishingGui.find('**/photo_frame1').copyTo(hidden)
albumGui.find('**/picture_frame').reparentTo(albumGui, -1)
albumGui.find('**/arrows').removeNode()
optiondefs = (('relief', None, None),
('state', DGG.NORMAL, None),
('image', albumGui, None),
('image_scale', (0.025, 0.025, 0.025), None),
('image_pos', (0, 1, 0), None),
('text', TTLocalizer.UnknownFish, None),
('text_scale', 0.065, None),
('text_fg', (0.2, 0.1, 0.0, 1), None),
('text_pos', (-0.5, -0.34), None),
('text_font', ToontownGlobals.getInterfaceFont(), None),
('text_wordwrap', 13.5, None),
('text_align', TextNode.ALeft, None))
self.defineoptions({}, optiondefs)
DirectFrame.__init__(self)
self.initialiseoptions(GenusPanel)
self.fishPanel = None
self.genus = None
self.setGenus(int(genus))
self.setScale(1.2)
albumGui.removeNode()
return
示例6: __makeGallery
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
def __makeGallery(self):
self.gallery = hidden.attachNewNode('gallery')
self.gallery.setDepthWrite(1)
self.gallery.setDepthTest(1)
self.suits = []
self.actors = []
self.text = TextNode('rogues')
self.text.setFont(ToontownGlobals.getInterfaceFont())
self.text.setAlign(TextNode.ACenter)
self.text.setTextColor(0.0, 0.0, 0.0, 1.0)
self.rowHeight = 0.0
self.minXScale = None
print "rognamestr='", self.rognamestr, "'\n"
if self.rognamestr == None or len(self.rognamestr) == 0:
for dept in SuitDNA.suitDepts:
self.__makeDept(dept)
else:
self.suitRow = []
self.rowWidth = 0.0
self.__makeSuit(None, None, self.rognamestr)
self.minXScale = self.xRowSpace / self.rowWidth
self.suits.append((self.rowWidth, self.suitRow))
del self.suitRow
self.__rescaleSuits()
return
示例7: load
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
def load(self):
gui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui')
shuffleFrame = gui.find('**/tt_t_gui_mat_shuffleFrame')
shuffleUp = gui.find('**/tt_t_gui_mat_shuffleUp')
shuffleDown = gui.find('**/tt_t_gui_mat_shuffleDown')
shuffleArrowUp = gui.find('**/tt_t_gui_mat_shuffleArrowUp')
shuffleArrowDown = gui.find('**/tt_t_gui_mat_shuffleArrowDown')
shuffleArrowDisabled = gui.find('**/tt_t_gui_mat_shuffleArrowDisabled')
gui.removeNode()
del gui
self.parentFrame = DirectFrame(parent=self.parent.parentFrame, relief=DGG.RAISED, pos=(0, 0, -1), frameColor=(1, 0, 0, 0))
self.shuffleFrame = DirectFrame(parent=self.parentFrame, image=shuffleFrame, image_scale=halfButtonInvertScale, relief=None, frameColor=(1, 1, 1, 1))
self.shuffleFrame.hide()
self.shuffleBtn = DirectButton(parent=self.parentFrame, relief=None, image=(shuffleUp, shuffleDown, shuffleUp), image_scale=halfButtonInvertScale, image1_scale=(-0.63, 0.6, 0.6), image2_scale=(-0.63, 0.6, 0.6), text=(TTLocalizer.ShuffleButton,
TTLocalizer.ShuffleButton,
TTLocalizer.ShuffleButton,
''), text_font=ToontownGlobals.getInterfaceFont(), text_scale=TTLocalizer.SBshuffleBtn, text_pos=(0, -0.02), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), command=self.chooseRandom)
self.incBtn = DirectButton(parent=self.parentFrame, relief=None, image=(shuffleArrowUp,
shuffleArrowDown,
shuffleArrowUp,
shuffleArrowDisabled), image_scale=halfButtonInvertScale, image1_scale=halfButtonInvertHoverScale, image2_scale=halfButtonInvertHoverScale, pos=(0.202, 0, 0), command=self.__goFrontHistory)
self.incBtn.hide()
self.decBtn = DirectButton(parent=self.parentFrame, relief=None, image=(shuffleArrowUp,
shuffleArrowDown,
shuffleArrowUp,
shuffleArrowDisabled), image_scale=halfButtonScale, image1_scale=halfButtonHoverScale, image2_scale=halfButtonHoverScale, pos=(-0.202, 0, 0), command=self.__goBackHistory)
self.decBtn.hide()
self.lerpDuration = 0.5
self.showLerp = None
self.frameShowLerp = LerpColorInterval(self.shuffleFrame, self.lerpDuration, Vec4(1, 1, 1, 1), Vec4(1, 1, 1, 0))
self.incBtnShowLerp = LerpColorInterval(self.incBtn, self.lerpDuration, Vec4(1, 1, 1, 1), Vec4(1, 1, 1, 0))
self.decBtnShowLerp = LerpColorInterval(self.decBtn, self.lerpDuration, Vec4(1, 1, 1, 1), Vec4(1, 1, 1, 0))
self.__updateArrows()
return
示例8: loadDnaStore
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
def loadDnaStore(self):
if not hasattr(self, "dnaStore"):
self.dnaStore = DNAStorage()
loader.loadDNAFile(self.dnaStore, "phase_4/dna/storage.dna")
self.dnaStore.storeFont("humanist", ToontownGlobals.getInterfaceFont())
self.dnaStore.storeFont("mickey", ToontownGlobals.getSignFont())
self.dnaStore.storeFont("suit", ToontownGlobals.getSuitFont())
loader.loadDNAFile(self.dnaStore, "phase_3.5/dna/storage_interior.dna")
示例9: load
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
def load(self):
self.picture = DirectButton(parent=self, image=(DGG.getDefaultDialogGeom(), DGG.getDefaultDialogGeom(), DGG.getDefaultDialogGeom()), relief=None, command=self.__launchFirework, extraArgs=[self.type], image_color=(0.8, 0.9, 1, 1))
self.picture.setScale(0.2)
self.picture.setPos(0, 0, 0)
self.picture.initialiseoptions(self.picture)
panelWidth = 7
nameFont = ToontownGlobals.getInterfaceFont()
self.quantityLabel = DirectLabel(parent=self.picture, relief=None, pos=(0, 0, 0.0), scale=0.45, text=self.name, text_scale=0.6, text_fg=(0, 0, 0, 1), text_pos=(0, -0.14, 0), text_font=nameFont, text_wordwrap=panelWidth)
示例10: loadDnaStore
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getInterfaceFont [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())
示例11: __init__
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
def __init__(self):
self.__expectedCount = 0
self.__count = 0
self.textures = [(loader.loadTexture('phase_3.5/maps/loading/toon.jpg'), ToontownGlobals.getInterfaceFont(), (0, 0, 0.5, 1)),
(loader.loadTexture('phase_3.5/maps/loading/cog.jpg'), ToontownGlobals.getSuitFont(), (1.0, 1.0, 1.0, 1)),
(loader.loadTexture('phase_3.5/maps/loading/default.jpg'), ToontownGlobals.getInterfaceFont(), (0, 0, 0.5, 1))
]
self.gui = loader.loadModel('phase_3/models/gui/progress-background.bam')
self.title = DirectLabel(guiId='ToontownLoadingScreenTitle', parent=self.gui, relief=None, pos=(base.a2dRight/5, 0, 0.235), text='', textMayChange=1, text_scale=0.08, text_fg=(0, 0, 0.5, 1), text_align=TextNode.ALeft, text_font=ToontownGlobals.getInterfaceFont())
self.tip = DirectLabel(guiId='ToontownLoadingScreenTip', parent=self.gui, relief=None, pos=(0, 0, 0.045), text='', textMayChange=1, text_scale=0.05, text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), text_align=TextNode.ACenter)
self.waitBar = DirectWaitBar(guiId='ToontownLoadingScreenWaitBar', parent=self.gui, frameSize=(base.a2dLeft+(base.a2dRight/4.95), base.a2dRight-(base.a2dRight/4.95), -0.03, 0.03), pos=(0, 0, 0.15), text='')
logoScale = 0.5625 # Scale for our locked aspect ratio (2:1).
self.logo = OnscreenImage(
image='phase_3/maps/toontown-logo.png',
scale=(logoScale * 2.0, 1, logoScale))
self.logo.reparentTo(hidden)
self.logo.setTransparency(TransparencyAttrib.MAlpha)
scale = self.logo.getScale()
self.logo.setPos(0, 0, -scale[2])
示例12: loadDnaStore
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
def loadDnaStore(self):
if not hasattr(self, "dnaStore"):
self.dnaStore = DNAStorage()
loader.loadDNA("phase_4/dna/storage.xml").store(self.dnaStore)
self.dnaStore.storeFont(ToontownGlobals.getInterfaceFont(), "humanist")
self.dnaStore.storeFont(ToontownGlobals.getSignFont(), "mickey")
self.dnaStore.storeFont(ToontownGlobals.getSuitFont(), "suit")
loader.loadDNA("phase_3.5/dna/storage_interior.xml").store(self.dnaStore)
示例13: generatePage
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
def generatePage(self):
pageText = '%s - %s' % (self.category, self.pageNum)
self.textNode = TextNode(pageText)
self.textNode.setText(pageText)
self.textNode.setFont(ToontownGlobals.getInterfaceFont())
self.textNode = self.attachNewNode(self.textNode)
self.textNode.setPos(*CatalogGlobals.ItemPageTextLoc)
self.textNode.setScale(CatalogGlobals.ItemPageTextScale)
self.textNode.setColor(0, 0, 0, 1)
for (x, item) in enumerate(self.catalogItems):
itemFrame = CatalogItemPanel(parent=self, parentCatalogScreen=self.parent, item=item)
itemFrame.load()
itemFrame.setPos(*CatalogGlobals.CatalogPropPos[x])
self.itemFrames.append(itemFrame)
示例14: setClarabelleChat
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
def setClarabelleChat(self, str, timeout = 6, type = None):
self.clearClarabelleChat()
if not self.clarabelleChatBalloon:
self.clarabelleChatBalloon = loader.loadModel('phase_3/models/props/chatbox')
self.clarabelleChat = ChatBalloon(self.clarabelleChatBalloon)
chatNode = self.clarabelleChat.generate(str, ToontownGlobals.getInterfaceFont())[0]
self.clarabelleChatNP = self.attachNewNode(chatNode.node(), 1000)
self.clarabelleChatNP.setScale(0.08)
self.clarabelleChatNP.setPos(0.7, 0, 0.6)
if timeout:
taskMgr.doMethodLater(timeout, self.clearClarabelleChat, 'clearClarabelleChat')
示例15: _initModel
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getInterfaceFont [as 别名]
def _initModel(self):
self.setPos(Globals.Gui.FuelPos2D[0], 0.0, Globals.Gui.FuelPos2D[1])
self.gui = CogdoUtil.loadFlyingModel('propellerMeter', group='gui')
self.gui.reparentTo(self)
self.gui.setBin('fixed', 0)
self.healthBar = self.gui.find('**/healthBar')
self.healthBar.setBin('fixed', 1)
self.healthBar.setColor(*Globals.Gui.FuelNormalColor)
bottomBarLocator = self.gui.find('**/bottomOfBar_loc')
bottomBarPos = bottomBarLocator.getPos(render)
topBarLocator = self.gui.find('**/topOfBar_loc')
topBarPos = topBarLocator.getPos(render)
zDist = topBarPos.getZ() - bottomBarPos.getZ()
self.fuelLowIndicator = self.gui.find('**/fuelLowIndicator')
self.fuelLowIndicator.setBin('fixed', 2)
pos = self.fuelLowIndicator.getPos(render)
newPos = pos
newPos.setZ(bottomBarPos.getZ() + zDist * Globals.Gameplay.FuelLowAmt)
self.fuelLowIndicator.setPos(render, newPos)
self.fuelVeryLowIndicator = self.gui.find('**/fuelVeryLowIndicator')
self.fuelVeryLowIndicator.setBin('fixed', 2)
pos = self.fuelVeryLowIndicator.getPos(render)
newPos = pos
newPos.setZ(bottomBarPos.getZ() + zDist * Globals.Gameplay.FuelVeryLowAmt)
self.fuelVeryLowIndicator.setPos(render, newPos)
self.propellerMain = self.gui.find('**/propellers')
self.propellerMain.setBin('fixed', 3)
self.propellerHead = self.gui.find('**/propellerHead')
self.propellerHead.setBin('fixed', 4)
self.blades = []
self.activeBlades = []
index = 1
blade = self.propellerMain.find('**/propeller%d' % index)
while not blade.isEmpty():
self.blades.append(blade)
index += 1
blade = self.propellerMain.find('**/propeller%d' % index)
for blade in self.blades:
self.activeBlades.append(blade)
self.bladeNumberLabel = DirectLabel(parent=self.propellerHead, relief=None, pos=(Globals.Gui.FuelNumBladesPos2D[0], 0, Globals.Gui.FuelNumBladesPos2D[1]), scale=Globals.Gui.FuelNumBladesScale, text=str(len(self.activeBlades)), text_align=TextNode.ACenter, text_fg=(0.0,
0.0,
-0.002,
1), text_shadow=(0.75, 0.75, 0.75, 1), text_font=ToontownGlobals.getInterfaceFont())
self.bladeNumberLabel.setBin('fixed', 5)
return