本文整理汇总了Python中toontown.toonbase.ToontownGlobals.getMinnieFont方法的典型用法代码示例。如果您正苦于以下问题:Python ToontownGlobals.getMinnieFont方法的具体用法?Python ToontownGlobals.getMinnieFont怎么用?Python ToontownGlobals.getMinnieFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.toonbase.ToontownGlobals
的用法示例。
在下文中一共展示了ToontownGlobals.getMinnieFont方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getMinnieFont [as 别名]
def __init__(self, version='n/a'):
DirectObject.__init__(self)
self.backgroundNodePath = render2d.attachNewNode('background', 0)
self.backgroundModel = loader.loadModel(
'phase_3/models/gui/loading-background.bam')
self.backgroundModel.reparentTo(self.backgroundNodePath)
self.backgroundNodePath.find('**/fg').removeNode()
self.backgroundNodePath.setScale(1, 1, 1)
self.logo = OnscreenImage(
parent=base.a2dTopCenter, image='phase_3/maps/toontown-logo.png',
scale=(1.0, 1, 0.5), pos=(0, 0, -0.85))
self.logo.setTransparency(TransparencyAttrib.MAlpha)
self.label = OnscreenText(
TTLocalizer.ClickToStartLabel, parent=base.a2dBottomCenter,
font=ToontownGlobals.getMinnieFont(), fg=Vec4(1, 1, 1, 1),
scale=0.1, align=TextNode.ACenter)
self.label.setZ(0.35)
self.versionLabel = OnscreenText(
'\x01white_shadow\x01%s\x02' % version, parent=base.a2dBottomRight,
font=ToontownGlobals.getMinnieFont(), fg=Vec4(0, 0, 0, 1),
scale=0.06, align=TextNode.ARight)
self.versionLabel.setPos(-0.025, 0.025)
self.setColorScale(Vec4(0, 0, 0, 0))
self.fadeTrack = None
self.logoPosTrack = None
self.logoScaleTrack = None
self.labelPosTrack = None
self.labelColorScaleTrack = None
示例2: createDoorTimer
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getMinnieFont [as 别名]
def createDoorTimer(self, team):
timer = ToontownTimer(useImage=False, highlightNearEnd=False)
timer['text_font'] = ToontownGlobals.getMinnieFont()
timer.setFontColor(PartyGlobals.CogActivityColors[team])
timer.setScale(7.0)
timer.setPos(0.2, -0.03, 0.0)
return timer
示例3: setupSignText
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getMinnieFont [as 别名]
def setupSignText(self):
loader = self.cr.playGame.hood.loader
partyGate = loader.geom.find("**/partyGateSignGroup")
if partyGate.isEmpty():
self.notify.warning("Could not find partyGate_grp in loader.geom")
return None
gateFont = ToontownGlobals.getMinnieFont()
leftSign = partyGate.find("**/signTextL_locatorBack")
signScale = 0.34999999999999998
wordWrap = 8
leftText = DirectLabel.DirectLabel(
parent=leftSign,
pos=(0, 0.0, 0.0),
relief=None,
text=TTLocalizer.PartyGateLeftSign,
text_align=TextNode.ACenter,
text_font=gateFont,
text_wordwrap=wordWrap,
text_fg=Vec4(0.69999999999999996, 0.29999999999999999, 0.29999999999999999, 1.0),
scale=signScale,
)
rightSign = partyGate.find("**/signTextR_locatorFront")
rightText = DirectLabel.DirectLabel(
parent=rightSign,
pos=(0, 0.0, 0.0),
relief=None,
text=TTLocalizer.PartyGateRightSign,
text_align=TextNode.ACenter,
text_font=gateFont,
text_wordwrap=wordWrap,
text_fg=Vec4(0.69999999999999996, 0.29999999999999999, 0.29999999999999999, 1.0),
scale=signScale,
)
示例4: __init__
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getMinnieFont [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.shadow = self.screen.find('**/bar_shadow')
self.shadow.reparentTo(self.gui)
self.banner = hidden.attachNewNode('__dummy__')
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 = (0, .9, 0, 1), text_align = TextNode.ALeft,
text_font = ToontownGlobals.getMinnieFont())
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-new.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)
示例5: updatePage
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getMinnieFont [as 别名]
def updatePage(self):
print 'updating achievements page'
self.avAchievements = localAvatar.achievements
for achievement in self.achievements:
achievement.destroy()
del self.achievements
self.achievements = []
start_pos = LVecBase3(0.72, 1, -0.21)
seperation = LVecBase3(0.45, 0, 0.4)
for achievement in xrange(len(AchievementsGlobals.AchievementTitles)):
achievementFrame = DirectFrame(parent=self.scrollFrame.getCanvas(), image=DGG.getDefaultDialogGeom(), scale=(1.3, 0, 0.32),
relief=None, pos=(start_pos.x, 1, start_pos.z - seperation.z * achievement),
text=AchievementsGlobals.AchievementTitles[achievement], text_scale=(0.05, 0.13),
text_font=ToontownGlobals.getMinnieFont(), text_pos=(0, 0, 0))
self.achievements.append(achievementFrame)
if achievement in self.avAchievements:
achievementFrame['text'] = AchievementsGlobals.AchievementTitles[achievement]
achievementFrame['text_pos'] = (0, 0.2, -0.2)
currentAchievement = AchievementsGlobals.AchievementImages[achievement]
image = loader.loadModel(currentAchievement[0])
imageNode = image.find(currentAchievement[1])
imageNode.setColor(currentAchievement[2])
img = OnscreenGeom(geom=imageNode, parent=achievementFrame, pos=(-0.3, 0, 0))
else:
achievementFrame['text'] = '???'
示例6: load
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getMinnieFont [as 别名]
def load(self):
ShtikerPage.ShtikerPage.load(self)
self.avAchievements = localAvatar.achievements
self.title = DirectLabel(parent=self, relief=None, text=TTLocalizer.AchievementsPageTitle, text_scale=0.12, textMayChange=1, pos=(0, 0, 0.62))
start_pos = LVecBase3(0.72, 1, -0.21)
seperation = LVecBase3(0.45, 0, 0.4)
cardModel = loader.loadModel('phase_3.5/models/gui/playingCard')
incButton = (self.gui.find('**/FndsLst_ScrollUp'),
self.gui.find('**/FndsLst_ScrollDN'),
self.gui.find('**/FndsLst_ScrollUp_Rllvr'),
self.gui.find('**/FndsLst_ScrollUp'))
self.scrollFrame = DirectScrolledFrame(parent=self, frameSize=(0, 1.5, -1.2, 0), pos=(-0.75, 1, 0.52),
canvasSize=(0, 1, -7, 0), frameColor=(0.85, 0.95, 1, 1))
for achievement in xrange(len(AchievementsGlobals.AchievementTitles)):
achievementFrame = DirectFrame(parent=self.scrollFrame.getCanvas(), image=DGG.getDefaultDialogGeom(), scale=(1.3, 0, 0.32),
relief=None, pos=(start_pos.x, 1, start_pos.z - seperation.z * achievement),
text=AchievementsGlobals.AchievementTitles[achievement], text_scale=(0.05, 0.13),
text_font=ToontownGlobals.getMinnieFont(), text_pos=(0, 0, 0))
self.achievements.append(achievementFrame)
if achievement in self.avAchievements:
achievementFrame['text'] = AchievementsGlobals.AchievementTitles[achievement]
achievementFrame['text_pos'] = (0, 0.2, -0.2)
else:
achievementFrame['text'] = '???'
示例7: getTimer
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getMinnieFont [as 别名]
def getTimer(self, parent):
timeFont = ToontownGlobals.getMinnieFont()
timer = {}
timer['minute'] = DirectLabel(parent=parent, pos=TTLocalizer.DPtimerMinutePos, relief=None, text='59', text_align=TextNode.ACenter, text_font=timeFont, text_fg=(0.7, 0.3, 0.3, 1.0), scale=TTLocalizer.DPtimerMinute)
timer['colon'] = DirectLabel(parent=parent, pos=TTLocalizer.DPtimerColonPos, relief=None, text=':', text_align=TextNode.ACenter, text_font=timeFont, text_fg=(0.7, 0.3, 0.3, 1.0), scale=TTLocalizer.DPtimerColon)
timer['second'] = DirectLabel(parent=parent, relief=None, pos=TTLocalizer.DPtimerSecondPos, text='14', text_align=TextNode.ACenter, text_font=timeFont, text_fg=(0.7, 0.3, 0.3, 1.0), scale=TTLocalizer.DPtimerSecond)
timer['textLabel'] = DirectLabel(parent=parent, relief=None, pos=(0.0, 0.0, 1.15), text=TTLocalizer.PartyCountdownClockText, text_font=timeFont, text_fg=(0.7, 0.3, 0.3, 1.0), scale=TTLocalizer.DPtimerTextLabel)
return timer
示例8: createGuiObjects
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getMinnieFont [as 别名]
def createGuiObjects(self):
textScale = 0.075
timeFont = ToontownGlobals.getMinnieFont()
self.hourLabel = DirectLabel(parent=self, pos=(-0.015, 0, 0), relief=None, text='', text_scale=textScale, text_align=TextNode.ARight, text_font=timeFont)
self.colonLabel = DirectLabel(parent=self, relief=None, text=':', text_scale=textScale, text_align=TextNode.ACenter, text_font=timeFont)
self.minutesLabel = DirectLabel(relief=None, parent=self, pos=(0.015, 0, 0), text='', text_scale=textScale, text_align=TextNode.ALeft, text_font=timeFont)
self.amLabel = DirectLabel(relief=None, parent=self, pos=(0.14, 0, 0), text='', text_scale=textScale, text_align=TextNode.ALeft, text_font=timeFont)
self.ival = Sequence(Func(self.colonLabel.show), Wait(0.75), Func(self.colonLabel.hide), Wait(0.25), Func(self.updateTime))
self.ival.loop()
示例9: getFontByName
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getMinnieFont [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)
示例10: displayAchievement
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getMinnieFont [as 别名]
def displayAchievement(self):
currentAchievement = AchievementsGlobals.AchievementImages[self.currentShowingAward]
image = loader.loadModel(currentAchievement[0])
imageNode = image.find(currentAchievement[1])
imageNode.setColor(currentAchievement[2])
imageNode.setScale(currentAchievement[3])
self.frame = OnscreenGeom(geom='phase_3/models/gui/dialog_box_gui', scale=(0.8, 1, 0.55), parent=base.a2dTopRight,
pos=(0.45, 0, -0.275))
self.image = OnscreenGeom(geom=imageNode, parent=self.frame)
self.title = OnscreenText(text='You earned an Achievement!', scale=(0.06, 0.11), font=ToontownGlobals.getMinnieFont(),
parent=self.frame, pos=(0, 0.33), align=TextNode.ACenter)
self.achievementName = OnscreenText(text=AchievementsGlobals.AchievementTitles[self.currentShowingAward], scale=(0.06, 0.09),
font=ToontownGlobals.getMinnieFont(), parent=self.frame, align=TextNode.ACenter, pos=(0, 0.2))
self.details = OnscreenText(text=AchievementsGlobals.AchievementDesc[self.currentShowingAward], scale=(0.04, 0.07),
font=ToontownGlobals.getMinnieFont(), parent=self.frame, align=TextNode.ACenter, pos=(0, -0.4))
示例11: __init__
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getMinnieFont [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
示例12: getTimer
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getMinnieFont [as 别名]
def getTimer(self, parent):
timeFont = ToontownGlobals.getMinnieFont()
timer = {}
timer["minute"] = DirectLabel(
parent=parent,
pos=TTLocalizer.DPtimerMinutePos,
relief=None,
text="59",
text_align=TextNode.ACenter,
text_font=timeFont,
text_fg=(0.7, 0.3, 0.3, 1.0),
scale=TTLocalizer.DPtimerMinute,
)
timer["colon"] = DirectLabel(
parent=parent,
pos=TTLocalizer.DPtimerColonPos,
relief=None,
text=":",
text_align=TextNode.ACenter,
text_font=timeFont,
text_fg=(0.7, 0.3, 0.3, 1.0),
scale=TTLocalizer.DPtimerColon,
)
timer["second"] = DirectLabel(
parent=parent,
relief=None,
pos=TTLocalizer.DPtimerSecondPos,
text="14",
text_align=TextNode.ACenter,
text_font=timeFont,
text_fg=(0.7, 0.3, 0.3, 1.0),
scale=TTLocalizer.DPtimerSecond,
)
timer["textLabel"] = DirectLabel(
parent=parent,
relief=None,
pos=(0.0, 0.0, 1.15),
text=TTLocalizer.PartyCountdownClockText,
text_font=timeFont,
text_fg=(0.7, 0.3, 0.3, 1.0),
scale=TTLocalizer.DPtimerTextLabel,
)
return timer
示例13: __init__
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getMinnieFont [as 别名]
def __init__(self, parent=aspect2dp, rotateCard=False, **kw):
optiondefs = (("NPCID", "Uninitialized", None), ("relief", None, None), ("doneEvent", None, None))
self.defineoptions(kw, optiondefs)
DirectFrame.__init__(self, parent=parent)
self.initialiseoptions(NPCFriendCard)
cardModel = loader.loadModel("phase_3.5/models/gui/playingCard")
self.front = DirectFrame(parent=self, relief=None, image=cardModel.find("**/card_front"))
self.front.hide()
self.back = DirectFrame(
parent=self, relief=None, image=cardModel.find("**/card_back"), geom=cardModel.find("**/logo")
)
callButtonPosZ = -0.90000000000000002
textWordWrap = 16.0
textScale = 0.34999999999999998
textPosZ = 1.1499999999999999
nameScale = 0.40000000000000002
namePosZ = -0.45000000000000001
rarityScale = 0.20000000000000001
rarityPosZ = -1.2
self.NPCHeadDim = 1.2
self.NPCHeadPosZ = 0.45000000000000001
self.sosCountInfoPosZ = -0.90000000000000002
self.sosCountInfoScale = 0.40000000000000002
self.sosCountInfo2PosZ = -0.90000000000000002
self.sosCountInfo2Scale = 0.5
if rotateCard:
self.front.component("image0").configure(pos=(0, 0, 0.22), hpr=(0, 0, -90), scale=1.3500000000000001)
self.back.component("image0").configure(
hpr=(0, 0, -90), scale=(-1.3500000000000001, 1.3500000000000001, 1.3500000000000001)
)
callButtonPosZ = -2.1000000000000001
textWordWrap = 7.0
textScale = 0.5
textPosZ = 2.0
nameScale = 0.5
namePosZ = -0.89000000000000001
rarityScale = 0.25
rarityPosZ = -2.3999999999999999
self.NPCHeadDim = 1.8
self.NPCHeadPosZ = 0.40000000000000002
self.sosCountInfoPosZ = -2.1000000000000001
self.sosCountInfoScale = 0.40000000000000002
self.sosCountInfo2PosZ = -2.0
self.sosCountInfo2Scale = 0.55000000000000004
self.sosTypeInfo = DirectLabel(
parent=self.front,
relief=None,
text="",
text_font=ToontownGlobals.getMinnieFont(),
text_fg=self.normalTextColor,
text_scale=textScale,
text_align=TextNode.ACenter,
text_wordwrap=textWordWrap,
pos=(0, 0, textPosZ),
)
self.NPCHead = None
self.NPCName = DirectLabel(
parent=self.front,
relief=None,
text="",
text_fg=self.normalTextColor,
text_scale=nameScale,
text_align=TextNode.ACenter,
text_wordwrap=8.0,
pos=(0, 0, namePosZ),
)
buttonModels = loader.loadModel("phase_3.5/models/gui/inventory_gui")
upButton = buttonModels.find("**/InventoryButtonUp")
downButton = buttonModels.find("**/InventoryButtonDown")
rolloverButton = buttonModels.find("**/InventoryButtonRollover")
self.sosCallButton = DirectButton(
parent=self.front,
relief=None,
text=TTLocalizer.NPCCallButtonLabel,
text_fg=self.normalTextColor,
text_scale=0.28000000000000003,
text_align=TextNode.ACenter,
image=(upButton, downButton, rolloverButton, upButton),
image_color=(1.0, 0.20000000000000001, 0.20000000000000001, 1),
image0_color=Vec4(1.0, 0.40000000000000002, 0.40000000000000002, 1),
image3_color=Vec4(1.0, 0.40000000000000002, 0.40000000000000002, 0.40000000000000002),
image_scale=(4.4000000000000004, 1, 3.6000000000000001),
image_pos=Vec3(0, 0, 0.080000000000000002),
pos=(-1.1499999999999999, 0, callButtonPosZ),
scale=1.25,
command=self._NPCFriendCard__chooseNPCFriend,
)
self.sosCallButton.hide()
self.sosCountInfo = DirectLabel(
parent=self.front,
relief=None,
text="",
text_fg=self.normalTextColor,
text_scale=0.75,
text_align=TextNode.ALeft,
textMayChange=1,
pos=(0.0, 0, -1.0),
)
star = loader.loadModel("phase_3.5/models/gui/name_star")
#.........这里部分代码省略.........
示例14: __init__
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getMinnieFont [as 别名]
def __init__(self, picnicFunction, menuType):
self.picnicFunction = picnicFunction
DirectFrame.__init__(
self,
pos=(0.0, 0.0, 0.85),
image_color=ToontownGlobals.GlobalDialogColor,
image_scale=(1.8, 0.9, 0.13),
text='',
text_scale=0.05)
self.buttonModels = loader.loadModel('phase_3.5/models/gui/inventory_gui.bam')
self.upButton = self.buttonModels.find('**//InventoryButtonUp')
self.downButton = self.buttonModels.find('**/InventoryButtonDown')
self.rolloverButton = self.buttonModels.find('**/InventoryButtonRollover')
self['image'] = DGG.getDefaultDialogGeom()
if menuType == GameGlobals.TutorialMenu:
self.title = DirectLabel(
self,
relief=None,
text=TTLocalizer.PicnicTableMenuTutorial,
text_pos=(0.0, -0.038),
text_fg=(1, 0, 0, 1),
text_scale=0.09,
text_font=ToontownGlobals.getSignFont(),
text_shadow=(1, 1, 1, 1))
else:
self.title = DirectLabel(
self,
relief=None,
text=TTLocalizer.PicnicTableMenuSelect,
text_pos=(0.0, -0.04),
text_fg=(1, 0, 0, 1),
text_scale=0.09,
text_font=ToontownGlobals.getSignFont(),
text_shadow=(1, 1, 1, 1))
self.selectionButtons = loader.loadModel('phase_6/models/golf/picnic_game_menu.bam')
btn1 = self.selectionButtons.find('**/Btn1')
btn2 = self.selectionButtons.find('**/Btn2')
btn3 = self.selectionButtons.find('**/Btn3')
self.ChineseCheckers = DirectButton(
self,
image=(btn1.find('**/checkersBtnUp'), btn1.find('**/checkersBtnDn'), btn1.find('**/checkersBtnHi'), btn1.find('**/checkersBtnUp')),
scale=0.36,
relief=0,
pos=(0, 0, -0.7),
command=self.chineseCheckersSelected)
self.Checkers = DirectButton(
self,
image=(btn2.find('**/regular_checkersBtnUp'), btn2.find('**/regular_checkersBtnDn'), btn2.find('**/regular_checkersBtnHi'), btn2.find('**/regular_checkersBtnUp')),
scale=0.36,
relief=0,
pos=(0.8, 0, -0.7),
command=self.checkersSelected)
self.FindFour = DirectButton(
self,
image=(btn3.find('**/findfourBtnUp'), btn3.find('**/findfourBtnDn'), btn3.find('**/findfourBtnHi'), btn3.find('**/findfourBtnUp')),
scale=0.36,
relief=0,
pos=(-0.8, 0, -0.7),
command=self.findFourSelected)
if not base.config.GetBool('want-checkers', 1):
self.Checkers['command'] = self.doNothing()
self.Checkers.setColor(0.7, 0.7, 0.7, 0.7)
if not base.config.GetBool('want-chinese-checkers', 1):
self.ChineseCheckers['command'] = self.doNothing()
self.ChineseCheckers.setColor(0.7, 0.7, 0.7, 0.7)
if not base.config.GetBool('want-find-four', 1):
self.FindFour['command'] = self.doNothing()
self.FindFour.setColor(0.7, 0.7, 0.7, 0.7)
self.chineseText = OnscreenText(
text='Chinese Checkers',
pos=(0, 0.56, -0.8),
scale=0.15,
fg=Vec4(1, 1, 1, 1),
align=TextNode.ACenter,
font=ToontownGlobals.getMinnieFont(),
wordwrap=7,
shadow=(0, 0, 0, 0.8),
shadowOffset=(-0.1, -0.1),
mayChange=True)
self.chineseText.setR(-8)
self.checkersText = OnscreenText(
text='Checkers',
pos=(0.81, -.1, -0.8),
scale=0.15,
fg=Vec4(1, 1, 1, 1),
align=TextNode.ACenter,
font=ToontownGlobals.getMinnieFont(),
wordwrap=7,
shadow=(0, 0, 0, 0.8),
shadowOffset=(0.1, -0.1),
mayChange=True)
self.findFourText = OnscreenText(
text='Find Four',
pos=(-0.81, -.08, -0.8),
scale=0.15,
fg=Vec4(1, 1, 1, 1),
align=TextNode.ACenter,
font=ToontownGlobals.getMinnieFont(),
wordwrap=8,
shadow=(0, 0, 0, 0.8),
#.........这里部分代码省略.........
示例15: loadCalendarTab
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getMinnieFont [as 别名]
def loadCalendarTab(self):
self.calendarDisplay = self.attachNewNode('calendar')
self.toontownTimeLabel = DirectLabel(parent=self.calendarDisplay, pos=(0.175, 0, -0.69), text_align=TextNode.ARight, relief=None, text=TTLocalizer.EventsPageToontownTimeIs, text_scale=0.065, text_font=ToontownGlobals.getMinnieFont(), text_fg=(255 / 255.0,
146 / 255.0,
113 / 255.0,
1), textMayChange=0)
self.calendarGuiMonth = None # To be set upon tab's first opening.
pos = (0.35, 0, -0.69)
self.toontownTimeGui = ServerTimeGui(self.calendarDisplay, pos)
return