本文整理汇总了Python中src.toontown.toonbase.ToontownGlobals.getMinnieFont方法的典型用法代码示例。如果您正苦于以下问题:Python ToontownGlobals.getMinnieFont方法的具体用法?Python ToontownGlobals.getMinnieFont怎么用?Python ToontownGlobals.getMinnieFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类src.toontown.toonbase.ToontownGlobals
的用法示例。
在下文中一共展示了ToontownGlobals.getMinnieFont方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getTimer
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.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
示例2: createGuiObjects
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.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()
return
示例3: setupSignText
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.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
gateFont = ToontownGlobals.getMinnieFont()
leftSign = partyGate.find('**/signTextL_locatorBack')
signScale = 0.35
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.7, 0.3, 0.3, 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.7, 0.3, 0.3, 1.0), scale=signScale)
return
示例4: loadCalendarTab
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.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
示例5: createGuiObjects
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getMinnieFont [as 别名]
def createGuiObjects(self):
self.monthLabel = DirectLabel(parent=self.monthLocator, relief=None, text=TTLocalizer.Months[self.startDate.month], text_scale=0.075, text_font=ToontownGlobals.getMinnieFont(), text_fg=(40 / 255.0,
140 / 255.0,
246 / 255.0,
1.0))
self.yearLabel = DirectLabel(parent=self.yearLocator, relief=None, text=str(self.startDate.year), text_scale=0.03, text_font=ToontownGlobals.getMinnieFont(), text_fg=(140 / 255.0,
140 / 255.0,
246 / 255.0,
1.0))
self.weekdayLabels = []
for posIndex in xrange(7):
adjustedNameIndex = (posIndex - 1) % 7
self.weekdayLabels.append(DirectLabel(parent=self.weekDayLocators[posIndex], relief=None, text=TTLocalizer.DayNamesAbbrev[adjustedNameIndex], text_font=ToontownGlobals.getInterfaceFont(), text_fg=(255 / 255.0,
146 / 255.0,
113 / 255.0,
1.0), text_scale=0.05))
self.createGuiDays()
arrowUp = self.find('**/month_arrowR_up')
arrowDown = self.find('**/month_arrowR_down')
arrowHover = self.find('**/month_arrowR_hover')
self.monthLeftArrow = DirectButton(parent=self.monthLeftLocator, relief=None, image=(arrowUp,
arrowDown,
arrowHover,
arrowUp), image3_color=Vec4(1, 1, 1, 0.5), scale=(-1.0, 1.0, 1.0), command=self.__doMonthLeft)
if self.onlyFutureMonthsClickable:
self.monthLeftArrow.hide()
self.monthRightArrow = DirectButton(parent=self.monthRightLocator, relief=None, image=(arrowUp,
arrowDown,
arrowHover,
arrowUp), image3_color=Vec4(1, 1, 1, 0.5), command=self.__doMonthRight)
def makeLabel(itemName, itemNum, *extraArgs):
return DirectLabel(text=itemName, frameColor=(0, 0, 0, 0), text_scale=0.04)
gui = loader.loadModel('phase_4/models/parties/tt_m_gui_sbk_calendar_box')
arrowUp = gui.find('**/downScroll_up')
arrowDown = gui.find('**/downScroll_down')
arrowHover = gui.find('**/downScroll_hover')
filterLocatorUpPos = self.filterLocatorArrowUp.getPos(self.filterLocator)
filterLocatorDownPos = self.filterLocatorArrowDown.getPos(self.filterLocator)
self.filterList = DirectScrolledList(parent=self.filterLocator, relief=None, pos=(0, 0, 0), image=None, text_scale=0.025, incButton_image=(arrowUp,
arrowDown,
arrowHover,
arrowUp), incButton_relief=None, incButton_pos=filterLocatorDownPos, incButton_image3_color=Vec4(1, 1, 1, 0.2), incButtonCallback=self.filterChanged, decButton_image=(arrowUp,
arrowDown,
arrowHover,
arrowUp), decButton_relief=None, decButton_pos=filterLocatorUpPos, decButton_scale=(1, 1, -1), decButton_image3_color=Vec4(1, 1, 1, 0.2), decButtonCallback=self.filterChanged, numItemsVisible=1, itemMakeFunction=makeLabel, items=[TTLocalizer.CalendarShowAll, TTLocalizer.CalendarShowOnlyHolidays, TTLocalizer.CalendarShowOnlyParties], itemFrame_frameSize=(-.2, 0.2, -.02, 0.05), itemFrame_frameColor=(0, 0, 0, 0))
gui.removeNode()
return
示例6: __init__
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.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),
#.........这里部分代码省略.........
示例7: __init__
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getMinnieFont [as 别名]
def __init__(self, parent = aspect2d, **kw):
bookModel = loader.loadModel('phase_3.5/models/gui/stickerbook_gui')
circleModel = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_nameShop').find('**/tt_t_gui_mat_namePanelCircle')
questCard = bookModel.find('**/questCard')
optiondefs = (('relief', None, None),
('image', questCard, None),
('image_scale', (0.8, 1.0, 0.58), None),
('state', DGG.NORMAL, None))
self.defineoptions(kw, optiondefs)
DirectFrame.__init__(self, relief=None)
self.initialiseoptions(QuestPoster)
self._deleteCallback = None
self.questFrame = DirectFrame(parent=self, relief=None)
self.headline = DirectLabel(parent=self.questFrame, relief=None, text='', text_font=ToontownGlobals.getMinnieFont(), text_fg=self.normalTextColor, text_scale=0.05, text_align=TextNode.ACenter, text_wordwrap=12.0, textMayChange=1, pos=(0, 0, 0.23))
self.questInfo = DirectLabel(parent=self.questFrame, relief=None, text='', text_fg=self.normalTextColor, text_scale=TEXT_SCALE, text_align=TextNode.ACenter, text_wordwrap=TEXT_WORDWRAP, textMayChange=1, pos=(0, 0, -0.0625))
self.rewardText = DirectLabel(parent=self.questFrame, relief=None, text='', text_fg=self.colors['rewardRed'], text_scale=0.0425, text_align=TextNode.ALeft, text_wordwrap=17.0, textMayChange=1, pos=(-0.36, 0, -0.26))
self.rewardText.hide()
self.lPictureFrame = DirectFrame(parent=self.questFrame, relief=None, image=bookModel.find('**/questPictureFrame'), image_scale=IMAGE_SCALE_SMALL, text='', text_pos=(0, -0.11), text_fg=self.normalTextColor, text_scale=TEXT_SCALE, text_align=TextNode.ACenter, text_wordwrap=11.0, textMayChange=1)
self.lPictureFrame.hide()
self.rPictureFrame = DirectFrame(parent=self.questFrame, relief=None, image=bookModel.find('**/questPictureFrame'), image_scale=IMAGE_SCALE_SMALL, text='', text_pos=(0, -0.11), text_fg=self.normalTextColor, text_scale=TEXT_SCALE, text_align=TextNode.ACenter, text_wordwrap=11.0, textMayChange=1, pos=(0.18, 0, 0.13))
self.rPictureFrame.hide()
self.lQuestIcon = DirectFrame(parent=self.lPictureFrame, relief=None, text=' ', text_font=ToontownGlobals.getSuitFont(), text_pos=(0, -0.03), text_fg=self.normalTextColor, text_scale=0.13, text_align=TextNode.ACenter, text_wordwrap=13.0, textMayChange=1)
self.lQuestIcon.setColorOff(-1)
self.rQuestIcon = DirectFrame(parent=self.rPictureFrame, relief=None, text=' ', text_font=ToontownGlobals.getSuitFont(), text_pos=(0, -0.03), text_fg=self.normalTextColor, text_scale=0.13, text_align=TextNode.ACenter, text_wordwrap=13.0, textMayChange=1)
self.rQuestIcon.setColorOff(-1)
self.auxText = DirectLabel(parent=self.questFrame, relief=None, text='', text_scale=TTLocalizer.QPauxText, text_fg=self.normalTextColor, text_align=TextNode.ACenter, textMayChange=1)
self.auxText.hide()
self.questProgress = DirectWaitBar(parent=self.questFrame, relief=DGG.SUNKEN, frameSize=(-0.95, 0.95, -0.1, 0.12), borderWidth=(0.025, 0.025), scale=0.2, frameColor=(0.945, 0.875, 0.706, 1.0), barColor=(0.5, 0.7, 0.5, 1), text='0/0', text_scale=0.19, text_fg=(0.05, 0.14, 0.4, 1), text_align=TextNode.ACenter, text_pos=(0, -0.04), pos=(0, 0, -0.195))
self.questProgress.hide()
self.funQuest = DirectLabel(parent=self.questFrame, relief=None, text=TTLocalizer.QuestPosterFun, text_fg=(0.0, 0.439, 1.0, 1.0), text_shadow=(0, 0, 0, 1), pos=(0, 0, -0.125), scale=0.04)
self.funQuest.hide()
self.teleportButton = DirectButton(parent=self.questFrame, relief=None, image=circleModel, text="Teleport", text_scale=0.035, text_pos=(-0.0025, -0.015), pos=(0.175, 0, 0.125), scale=0.75) #, text_bg=(0, 0.75, 1, 1)
self.teleportButton.hide()
self.laffMeter = None
self.filmstrip = None
self.question = None
return
示例8: __init__
# 需要导入模块: from src.toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from src.toontown.toonbase.ToontownGlobals import getMinnieFont [as 别名]
def __init__(self, parent = aspect2dp, **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'))
self.sosTypeInfo = DirectLabel(parent=self.front, relief=None, text='', text_font=ToontownGlobals.getMinnieFont(), text_fg=self.normalTextColor, text_scale=0.35, text_align=TextNode.ACenter, text_wordwrap=16.0, pos=(0, 0, 1.15))
self.NPCHead = None
self.NPCName = DirectLabel(parent=self.front, relief=None, text='', text_fg=self.normalTextColor, text_scale=0.4, text_align=TextNode.ACenter, text_wordwrap=8.0, pos=(0, 0, -0.45))
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.28, text_align=TextNode.ACenter, image=(upButton,
downButton,
rolloverButton,
upButton), image_color=(1.0, 0.2, 0.2, 1), image0_color=Vec4(1.0, 0.4, 0.4, 1), image3_color=Vec4(1.0, 0.4, 0.4, 0.4), image_scale=(4.4, 1, 3.6), image_pos=Vec3(0, 0, 0.08), pos=(-1.15, 0, -0.9), scale=1.25, command=self.__chooseNPCFriend)
self.sosCallButton.hide()
trashcanGui = loader.loadModel('phase_3/models/gui/trashcan_gui')
trashClosedButton = trashcanGui.find('**/TrashCan_CLSD')
trashOpenedButton = trashcanGui.find('**/TrashCan_OPEN')
trashRolloverButton = trashcanGui.find('**/TrashCan_RLVR')
self.sosDeleteButton = DirectButton(parent=self.front, relief=None, text=('', TTLocalizer.NPCFriendPageDelete, TTLocalizer.NPCFriendPageDelete, ''), text_fg=self.normalTextColor, text_scale=0.28, text_align=TextNode.ACenter, image=(trashClosedButton, trashOpenedButton, trashRolloverButton), image_pos=(Vec3(0, 0, 0.08)), pos=(1.25, 0, 0.6), scale=2, command=self.__handleDeleteNPCFriend)
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')
self.rarityStars = []
for i in xrange(self.maxRarity):
label = DirectLabel(parent=self.front, relief=None, image=star, image_scale=0.2, image_color=Vec4(0.502, 0.251, 0.251, 1.0), pos=(1.1 - i * 0.24, 0, -1.2))
label.hide()
self.rarityStars.append(label)
self.confirmationDialog = None