当前位置: 首页>>代码示例>>Python>>正文


Python WindowProperties.addProperties方法代码示例

本文整理汇总了Python中pandac.PandaModules.WindowProperties.addProperties方法的典型用法代码示例。如果您正苦于以下问题:Python WindowProperties.addProperties方法的具体用法?Python WindowProperties.addProperties怎么用?Python WindowProperties.addProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pandac.PandaModules.WindowProperties的用法示例。


在下文中一共展示了WindowProperties.addProperties方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: resetWindowProperties

# 需要导入模块: from pandac.PandaModules import WindowProperties [as 别名]
# 或者: from pandac.PandaModules.WindowProperties import addProperties [as 别名]
 def resetWindowProperties(self, pipe, properties):
     if base.win:
         currentProperties = WindowProperties(base.win.getProperties())
         gsg = base.win.getGsg()
     else:
         currentProperties = WindowProperties.getDefault()
         gsg = None
     newProperties = WindowProperties(currentProperties)
     newProperties.addProperties(properties)
     if base.pipe != pipe:
         gsg = None
     if gsg == None or currentProperties.getFullscreen() != newProperties.getFullscreen() or currentProperties.getParentWindow() != newProperties.getParentWindow():
         self.notify.debug('window properties: %s' % properties)
         self.notify.debug('gsg: %s' % gsg)
         base.pipe = pipe
         if not base.openMainWindow(props=properties, gsg=gsg, keepCamera=True):
             self.notify.warning('OPEN MAIN WINDOW FAILED')
             return 0
         self.notify.info('OPEN MAIN WINDOW PASSED')
         base.graphicsEngine.openWindows()
         if base.win.isClosed():
             self.notify.warning('Window did not open, removing.')
             base.closeWindow(base.win)
             return 0
         base.disableShowbaseMouse()
         if 'libotp' in sys.modules:
             from libotp import NametagGlobals
             NametagGlobals.setCamera(base.cam)
             NametagGlobals.setMouseWatcher(base.mouseWatcherNode)
     else:
         self.notify.debug('Adjusting properties')
         base.win.requestProperties(properties)
         base.graphicsEngine.renderFrame()
     return 1
开发者ID:gamerdave54321,项目名称:Toontown-House-Code,代码行数:36,代码来源:DisplayOptions.py

示例2: onSize

# 需要导入模块: from pandac.PandaModules import WindowProperties [as 别名]
# 或者: from pandac.PandaModules.WindowProperties import addProperties [as 别名]
	def onSize(self, event=None):
		'''to resize P3d Surface accordingly to his wx window container and to re-gain keyboard focus
		'''
		wp0=base.win.getProperties()
		if not wp0.getOpen():
			print ">>>[app onSize] win wasn't open: lets quit!"
			return
		wp=WindowProperties()
		wp.addProperties(wp0)
		wp.setSize(*self.win.getP3DSurfaceSize())
		wp.setForeground(True)
		base.win.requestProperties(wp)
		if event != None: event.Skip()
开发者ID:crempp,项目名称:psg,代码行数:15,代码来源:Editor.py


注:本文中的pandac.PandaModules.WindowProperties.addProperties方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。