A little more work on multi-window

This commit is contained in:
Joshua Granick
2015-08-12 15:20:35 -07:00
parent 384cfd391c
commit 4b4b22b397
2 changed files with 7 additions and 16 deletions

View File

@@ -230,6 +230,8 @@ class NativeApplication {
for (renderer in parent.renderers) {
parent.renderer = renderer;
switch (renderEventInfo.type) {
case RENDER:

View File

@@ -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];
}
}