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