本文整理匯總了Python中libotp.NametagGlobals.setThoughtBalloon2d方法的典型用法代碼示例。如果您正苦於以下問題:Python NametagGlobals.setThoughtBalloon2d方法的具體用法?Python NametagGlobals.setThoughtBalloon2d怎麽用?Python NametagGlobals.setThoughtBalloon2d使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類libotp.NametagGlobals
的用法示例。
在下文中一共展示了NametagGlobals.setThoughtBalloon2d方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: initNametagGlobals
# 需要導入模塊: from libotp import NametagGlobals [as 別名]
# 或者: from libotp.NametagGlobals import setThoughtBalloon2d [as 別名]
def initNametagGlobals(self):
arrow = loader.loadModel('models/gui/arrow')
card = NodePath('card')
speech3d = ChatBalloon(loader.loadModel('models/gui/chatbox'))
thought3d = ChatBalloon(loader.loadModel('models/gui/chatbox_thought_cutout'))
speech2d = ChatBalloon(loader.loadModel('models/gui/chatbox_noarrow'))
chatButtonGui = loader.loadModel('models/gui/triangle')
chatButtonGui.setScale(0.10000000000000001)
chatButtonGui.flattenStrong()
lookoutButtonGui = loader.loadModel('models/gui/lookout_gui')
lookoutButtonGui.setScale(0.40000000000000002)
lookoutButtonGui.flattenStrong()
NametagGlobals.setCamera(self.cam)
NametagGlobals.setArrowModel(arrow)
NametagGlobals.setNametagCard(card, VBase4(-1, 1, -1, 1))
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('**/triangle'))
NametagGlobals.setPageButton(PGButton.SDepressed, chatButtonGui.find('**/triangle_down'))
NametagGlobals.setPageButton(PGButton.SRollover, chatButtonGui.find('**/triangle_over'))
NametagGlobals.setQuitButton(PGButton.SReady, lookoutButtonGui.find('**/lookout_close_window'))
NametagGlobals.setQuitButton(PGButton.SDepressed, lookoutButtonGui.find('**/lookout_close_window_down'))
NametagGlobals.setQuitButton(PGButton.SRollover, lookoutButtonGui.find('**/lookout_close_window_over'))
rolloverSound = PiratesGuiGlobals.getDefaultRolloverSound()
clickSound = PiratesGuiGlobals.getDefaultClickSound()
NametagGlobals.setRolloverSound(rolloverSound)
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
self.leftCells = [
mm.addGridCell(0, 1.5, base.a2dLeft, base.a2dRight, base.a2dBottom, base.a2dTop),
mm.addGridCell(0, 2.5, base.a2dLeft, base.a2dRight, base.a2dBottom, base.a2dTop),
mm.addGridCell(0, 3.5, base.a2dLeft, base.a2dRight, base.a2dBottom, base.a2dTop)]
self.bottomCells = [
mm.addGridCell(0.5, 0.5, base.a2dLeft, base.a2dRight, base.a2dBottom, base.a2dTop),
mm.addGridCell(1.5, 0.5, base.a2dLeft, base.a2dRight, base.a2dBottom, base.a2dTop),
mm.addGridCell(2.5, 0.5, base.a2dLeft, base.a2dRight, base.a2dBottom, base.a2dTop),
mm.addGridCell(3.5, 0.5, base.a2dLeft, base.a2dRight, base.a2dBottom, base.a2dTop),
mm.addGridCell(4.5, 0.5, base.a2dLeft, base.a2dRight, base.a2dBottom, base.a2dTop)]
self.rightCells = [
mm.addGridCell(5, 2.5, base.a2dLeft, base.a2dRight, base.a2dBottom, base.a2dTop),
mm.addGridCell(5, 1.5, base.a2dLeft, base.a2dRight, base.a2dBottom, base.a2dTop)]