本文整理汇总了Python中toontown.nametag.NametagGlobals.setRolloverSound方法的典型用法代码示例。如果您正苦于以下问题:Python NametagGlobals.setRolloverSound方法的具体用法?Python NametagGlobals.setRolloverSound怎么用?Python NametagGlobals.setRolloverSound使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.nametag.NametagGlobals
的用法示例。
在下文中一共展示了NametagGlobals.setRolloverSound方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: initNametagGlobals
# 需要导入模块: from toontown.nametag import NametagGlobals [as 别名]
# 或者: from toontown.nametag.NametagGlobals import setRolloverSound [as 别名]
def initNametagGlobals(self):
NametagGlobals.setMe(base.cam)
NametagGlobals.setCardModel('phase_3/models/props/panel.bam')
NametagGlobals.setArrowModel('phase_3/models/props/arrow.bam')
NametagGlobals.setChatBalloon3dModel('phase_3/models/props/chatbox.bam')
NametagGlobals.setChatBalloon2dModel(
'phase_3/models/props/chatbox_noarrow.bam')
NametagGlobals.setThoughtBalloonModel(
'phase_3/models/props/chatbox_thought_cutout.bam')
chatButtonGui = loader.loadModel(
'phase_3/models/gui/chat_button_gui.bam')
NametagGlobals.setPageButton(
chatButtonGui.find('**/Horiz_Arrow_UP'),
chatButtonGui.find('**/Horiz_Arrow_DN'),
chatButtonGui.find('**/Horiz_Arrow_Rllvr'),
chatButtonGui.find('**/Horiz_Arrow_UP'))
NametagGlobals.setQuitButton(
chatButtonGui.find('**/CloseBtn_UP'),
chatButtonGui.find('**/CloseBtn_DN'),
chatButtonGui.find('**/CloseBtn_Rllvr'),
chatButtonGui.find('**/CloseBtn_UP'))
chatButtonGui.removeNode()
rolloverSound = DirectGuiGlobals.getDefaultRolloverSound()
if rolloverSound is not None:
NametagGlobals.setRolloverSound(rolloverSound)
clickSound = DirectGuiGlobals.getDefaultClickSound()
if clickSound is not None:
NametagGlobals.setClickSound(clickSound)
self.marginManager = MarginManager()
self.margins = self.aspect2d.attachNewNode(
self.marginManager, DirectGuiGlobals.MIDGROUND_SORT_INDEX + 1)
self.leftCells = [
self.marginManager.addCell(0.1, -0.6, self.a2dTopLeft),
self.marginManager.addCell(0.1, -1.0, self.a2dTopLeft),
self.marginManager.addCell(0.1, -1.4, self.a2dTopLeft)
]
self.bottomCells = [
self.marginManager.addCell(0.4, 0.1, self.a2dBottomCenter),
self.marginManager.addCell(-0.4, 0.1, self.a2dBottomCenter),
self.marginManager.addCell(-1.0, 0.1, self.a2dBottomCenter),
self.marginManager.addCell(1.0, 0.1, self.a2dBottomCenter)
]
self.rightCells = [
self.marginManager.addCell(-0.1, -0.6, self.a2dTopRight),
self.marginManager.addCell(-0.1, -1.0, self.a2dTopRight),
self.marginManager.addCell(-0.1, -1.4, self.a2dTopRight)
]