本文整理汇总了Python中toontown.toonbase.ToontownGlobals.getNametagFont方法的典型用法代码示例。如果您正苦于以下问题:Python ToontownGlobals.getNametagFont方法的具体用法?Python ToontownGlobals.getNametagFont怎么用?Python ToontownGlobals.getNametagFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.toonbase.ToontownGlobals
的用法示例。
在下文中一共展示了ToontownGlobals.getNametagFont方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getPicture
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getNametagFont [as 别名]
def getPicture(self, avatar):
frame = self.makeFrame()
if self.nametagStyle == 100:
inFont = ToontownGlobals.getToonFont()
else:
inFont = ToontownGlobals.getNametagFont(self.nametagStyle)
nameTagDemo = DirectLabel(parent=frame, relief=None, pos=(0, 0, 0.24), scale=0.5, text=localAvatar.getName(), text_fg=(1.0, 1.0, 1.0, 1), text_shadow=(0, 0, 0, 1), text_font=inFont, text_wordwrap=9)
self.hasPicture = True
return (frame, None)
示例2: __updateNametagStyle
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getNametagFont [as 别名]
def __updateNametagStyle(self, resetIndex=True):
chooser = self.optionChoosers['nametag_style']
if resetIndex:
chooser.setIndex(base.localAvatar.nametagStyles.index(base.localAvatar.getNametagStyle()))
nametagId = base.localAvatar.nametagStyles[chooser.index]
chooser.setDisplayText('%s\n%s' % (base.localAvatar.getName(), TTLocalizer.NametagFontNames[nametagId]))
chooser.setDisplayFont(ToontownGlobals.getNametagFont(nametagId))
chooser.decideButtons(0, len(base.localAvatar.nametagStyles) - 1)