本文整理汇总了Python中panda3d.core.WindowProperties.setUndecorated方法的典型用法代码示例。如果您正苦于以下问题:Python WindowProperties.setUndecorated方法的具体用法?Python WindowProperties.setUndecorated怎么用?Python WindowProperties.setUndecorated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类panda3d.core.WindowProperties
的用法示例。
在下文中一共展示了WindowProperties.setUndecorated方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from panda3d.core import WindowProperties [as 别名]
# 或者: from panda3d.core.WindowProperties import setUndecorated [as 别名]
def __init__(self):
ShowBase.__init__(self)
# self.base.enableParticles()
# load operation map which holds state of operations
self.operationmap = operationMap
self.op = operationMap
self.mode = self.op['mode']
# sound analyzer
self.snd = SoundAnalyzer()
self.snd.start()
# set up another camera to view stuff in other window
self.disableMouse()
props = WindowProperties()
props.setSize(1600, 900)
props.setUndecorated(True)
props.setOrigin(0,0)
self.otherWin = self.openWindow(props, makeCamera = 0)
props = WindowProperties()
props.setCursorHidden(True)
self.win.requestProperties(props)
self.win.setClearColor((0,0,0,1))
self.otherWin.setClearColor((0,0,0,1))
self.gridCard = CardMaker("grid")
self.gridCard.setFrame(-10,10,-10,10)
self.grid = self.render.attachNewNode(self.gridCard.generate())
self.grid.setP(90)
self.grid.setZ(-50)
self.grid.setTwoSided(1)
tex = self.loader.loadTexture("grid.png")
self.grid.setTexture(tex)
self.grid.setTransparency(TransparencyAttrib.MAlpha, 1)
self.grid.setScale(100)
self.grid.setAlphaScale(0.15)
# mouse shit
# Set the current viewing target
self.heading = 180
self.pitch = 0
# allocate visuals
self.visuals = {}
self.factory = VisualFactory(
loader,
self.render,
self.snd,
[self.win, self.otherWin]
)
#self.activeVisual = visual(loader, self.render, self.snd)
# refactor this
self.activeVisual = self.factory.visuals['placeholder']
self.visuals['placeholder'] = self.activeVisual
self.otherCam = self.makeCamera(self.otherWin)
self.camSpeed = 1.0
self.cam.setPos(0,-100,0)
self.camAfterMath()
self.cam.node().setCameraMask(BitMask32.bit(0))
self.otherCam.node().setCameraMask(BitMask32.bit(1))
self.grid.hide(BitMask32.bit(1))
self.hud = HUD(self)
self.hudToggle = 1
self.setFrameRateMeter(True)
# movement keys
self.accept('a', self.setOperation, ['a'])
self.accept('a-up', self.setOperation, ['a-up'])
self.accept('d', self.setOperation, ['d'])
self.accept('d-up', self.setOperation, ['d-up'])
self.accept('w', self.setOperation, ['w'])
self.accept('w-up', self.setOperation, ['w-up'])
self.accept('s', self.setOperation, ['s'])
self.accept('s-up', self.setOperation, ['s-up'])
self.accept('d', self.setOperation, ['d'])
self.accept('d-up', self.setOperation, ['d-up'])
self.accept('h', self.setOperation, ['h'])
self.accept('h-up', self.setOperation, ['h-up'])
self.accept('j', self.setOperation, ['j'])
self.accept('j-up', self.setOperation, ['j-up'])
self.accept('k', self.setOperation, ['k'])
self.accept('k-up', self.setOperation, ['k-up'])
self.accept('l', self.setOperation, ['l'])
self.accept('l-up', self.setOperation, ['l-up'])
self.accept('i', self.setOperation, ['i'])
self.accept('i-up', self.setOperation, ['i-up'])
self.accept('u', self.setOperation, ['u'])
self.accept('u-up', self.setOperation, ['u-up'])
self.accept('shift', self.setOperation, ['shift'])
self.accept('shift-up', self.setOperation, ['shift-up'])
self.accept('space', self.setOperation, ['space'])
self.accept('space-up', self.setOperation, ['space-up'])
self.accept('arrow_up', self.setOperation, ['arrow_up'])
self.accept('arrow_up-up', self.setOperation, ['arrow_up-up'])
self.accept('arrow_down', self.setOperation, ['arrow_down'])
self.accept('arrow_down-up', self.setOperation, ['arrow_down-up'])
#.........这里部分代码省略.........