A little more work on multi-window
This commit is contained in:
@@ -230,6 +230,8 @@ class NativeApplication {
|
||||
|
||||
for (renderer in parent.renderers) {
|
||||
|
||||
parent.renderer = renderer;
|
||||
|
||||
switch (renderEventInfo.type) {
|
||||
|
||||
case RENDER:
|
||||
|
||||
@@ -31,9 +31,9 @@ class Application extends Module {
|
||||
*/
|
||||
public var onUpdate = new Event<Int->Void> ();
|
||||
|
||||
public var renderer (get, null):Renderer;
|
||||
public var renderer (default, null):Renderer;
|
||||
public var renderers (default, null):Array<Renderer>;
|
||||
public var window (get, null):Window;
|
||||
public var window (default, null):Window;
|
||||
public var windows (default, null):Array<Window>;
|
||||
|
||||
@:noCompletion private var backend:ApplicationBackend;
|
||||
@@ -89,6 +89,7 @@ class Application extends Module {
|
||||
renderer.onRenderContextRestored.add (onRenderContextRestored);
|
||||
|
||||
renderers.push (renderer);
|
||||
this.renderer = renderer;
|
||||
|
||||
}
|
||||
|
||||
@@ -101,6 +102,7 @@ class Application extends Module {
|
||||
public function addWindow (window:Window):Void {
|
||||
|
||||
windows.push (window);
|
||||
this.window = window;
|
||||
|
||||
window.onGamepadAxisMove.add (onGamepadAxisMove);
|
||||
window.onGamepadButtonDown.add (onGamepadButtonDown);
|
||||
@@ -134,6 +136,7 @@ class Application extends Module {
|
||||
|
||||
window.create (this);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -604,20 +607,6 @@ class Application extends Module {
|
||||
}
|
||||
|
||||
|
||||
@:noCompletion private inline function get_renderer ():Renderer {
|
||||
|
||||
return renderers[0];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@:noCompletion private inline function get_window ():Window {
|
||||
|
||||
return windows[0];
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user