mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
appRunner.windowProperties
This commit is contained in:
parent
f814e574dd
commit
01da0758e3
@ -173,6 +173,11 @@ class AppRunner(DirectObject):
|
|||||||
print "Ignoring request: %s" % (args,)
|
print "Ignoring request: %s" % (args,)
|
||||||
self.requestFunc = defaultRequestFunc
|
self.requestFunc = defaultRequestFunc
|
||||||
|
|
||||||
|
# This will be filled in with the default WindowProperties for
|
||||||
|
# this instance, e.g. the WindowProperties necessary to
|
||||||
|
# re-embed a window in the browser frame.
|
||||||
|
self.windowProperties = None
|
||||||
|
|
||||||
# Store our pointer so DirectStart-based apps can find us.
|
# Store our pointer so DirectStart-based apps can find us.
|
||||||
if AppRunnerGlobal.appRunner is None:
|
if AppRunnerGlobal.appRunner is None:
|
||||||
AppRunnerGlobal.appRunner = self
|
AppRunnerGlobal.appRunner = self
|
||||||
@ -680,6 +685,10 @@ class AppRunner(DirectObject):
|
|||||||
self.windowPrc = None
|
self.windowPrc = None
|
||||||
WindowProperties.clearDefault()
|
WindowProperties.clearDefault()
|
||||||
|
|
||||||
|
# However, we keep the self.windowProperties object around, in
|
||||||
|
# case an application wants to return the window to the
|
||||||
|
# browser frame.
|
||||||
|
|
||||||
def setupWindow(self, windowType, x, y, width, height,
|
def setupWindow(self, windowType, x, y, width, height,
|
||||||
parent):
|
parent):
|
||||||
""" Applies the indicated window parameters to the prc
|
""" Applies the indicated window parameters to the prc
|
||||||
@ -730,6 +739,7 @@ class AppRunner(DirectObject):
|
|||||||
if width or height:
|
if width or height:
|
||||||
wp.setSize(width, height)
|
wp.setSize(width, height)
|
||||||
|
|
||||||
|
self.windowProperties = wp
|
||||||
self.windowPrc = loadPrcFileData("setupWindow", data)
|
self.windowPrc = loadPrcFileData("setupWindow", data)
|
||||||
WindowProperties.setDefault(wp)
|
WindowProperties.setDefault(wp)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user