本文整理汇总了Python中src.otp.nametag.NametagGlobals.setThoughtBalloon2d方法的典型用法代码示例。如果您正苦于以下问题:Python NametagGlobals.setThoughtBalloon2d方法的具体用法?Python NametagGlobals.setThoughtBalloon2d怎么用?Python NametagGlobals.setThoughtBalloon2d使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类src.otp.nametag.NametagGlobals
的用法示例。
在下文中一共展示了NametagGlobals.setThoughtBalloon2d方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: initNametagGlobals
# 需要导入模块: from src.otp.nametag import NametagGlobals [as 别名]
# 或者: from src.otp.nametag.NametagGlobals import setThoughtBalloon2d [as 别名]
def initNametagGlobals(self):
arrow = loader.loadModel('phase_3/models/props/arrow')
card = loader.loadModel('phase_3/models/props/panel')
speech3d = ChatBalloon(loader.loadModel('phase_3/models/props/chatbox'))
thought3d = ChatBalloon(loader.loadModel('phase_3/models/props/chatbox_thought_cutout'))
speech2d = ChatBalloon(loader.loadModel('phase_3/models/props/chatbox_noarrow'))
chatButtonGui = loader.loadModel('phase_3/models/gui/chat_button_gui')
NametagGlobals.setCamera(self.cam)
NametagGlobals.setArrowModel(arrow)
NametagGlobals.setNametagCard(card, VBase4(-0.5, 0.5, -0.5, 0.5))
if self.mouseWatcherNode:
NametagGlobals.setMouseWatcher(self.mouseWatcherNode)
NametagGlobals.setSpeechBalloon3d(speech3d)
NametagGlobals.setThoughtBalloon3d(thought3d)
NametagGlobals.setSpeechBalloon2d(speech2d)
NametagGlobals.setThoughtBalloon2d(thought3d)
NametagGlobals.setPageButton(PGButton.SReady, chatButtonGui.find('**/Horiz_Arrow_UP'))
NametagGlobals.setPageButton(PGButton.SDepressed, chatButtonGui.find('**/Horiz_Arrow_DN'))
NametagGlobals.setPageButton(PGButton.SRollover, chatButtonGui.find('**/Horiz_Arrow_Rllvr'))
NametagGlobals.setQuitButton(PGButton.SReady, chatButtonGui.find('**/CloseBtn_UP'))
NametagGlobals.setQuitButton(PGButton.SDepressed, chatButtonGui.find('**/CloseBtn_DN'))
NametagGlobals.setQuitButton(PGButton.SRollover, chatButtonGui.find('**/CloseBtn_Rllvr'))
rolloverSound = DirectGuiGlobals.getDefaultRolloverSound()
if rolloverSound:
NametagGlobals.setRolloverSound(rolloverSound)
clickSound = DirectGuiGlobals.getDefaultClickSound()
if clickSound:
NametagGlobals.setClickSound(clickSound)
NametagGlobals.setToon(self.cam)
self.marginManager = MarginManager()
self.margins = self.aspect2d.attachNewNode(self.marginManager, DirectGuiGlobals.MIDGROUND_SORT_INDEX + 1)
mm = self.marginManager
# TODO: Dynamicaly add more and reposition cells
padding = 0.0225
# Order: Top to bottom
self.leftCells = [
mm.addGridCell(0.2 + padding, -0.45, base.a2dTopLeft), # Above boarding groups
mm.addGridCell(0.2 + padding, -0.9, base.a2dTopLeft), # 1
mm.addGridCell(0.2 + padding, -1.35, base.a2dTopLeft) # Below Boarding Groups
]
# Order: Left to right
self.bottomCells = [
mm.addGridCell(-0.87, 0.2 + padding, base.a2dBottomCenter), # To the right of the laff meter
mm.addGridCell(-0.43, 0.2 + padding, base.a2dBottomCenter), # 1
mm.addGridCell(0.01, 0.2 + padding, base.a2dBottomCenter), # 2
mm.addGridCell(0.45, 0.2 + padding, base.a2dBottomCenter), # 3
mm.addGridCell(0.89, 0.2 + padding, base.a2dBottomCenter) # To the left of the shtiker book
]
# Order: Bottom to top
self.rightCells = [
mm.addGridCell(-0.2 - padding, -1.35, base.a2dTopRight), # Above the street map
mm.addGridCell(-0.2 - padding, -0.9, base.a2dTopRight), # Below the friends list
mm.addGridCell(-0.2 - padding, -0.45, base.a2dTopRight) # Behind the friends list
]