Don't require Application when creating Window
This commit is contained in:
@@ -51,7 +51,7 @@ class Application {
|
||||
public function addWindow (window:Window):Void {
|
||||
|
||||
windows.push (window);
|
||||
window.create ();
|
||||
window.create (this);
|
||||
|
||||
#if js
|
||||
|
||||
@@ -119,7 +119,7 @@ class Application {
|
||||
Window.onWindowActivate.add (onWindowActivate);
|
||||
Window.onWindowDeactivate.add (onWindowDeactivate);
|
||||
|
||||
var window = new Window (this, config);
|
||||
var window = new Window (config);
|
||||
var renderer = new Renderer (window);
|
||||
|
||||
window.width = config.width;
|
||||
|
||||
@@ -35,8 +35,6 @@ class Window {
|
||||
public var height:Int;
|
||||
public var width:Int;
|
||||
|
||||
private var application:Application;
|
||||
|
||||
#if js
|
||||
public var canvas:CanvasElement;
|
||||
public var div:DivElement;
|
||||
@@ -49,9 +47,8 @@ class Window {
|
||||
#end
|
||||
|
||||
|
||||
public function new (application:Application, config:Config) {
|
||||
public function new (config:Config) {
|
||||
|
||||
this.application = application;
|
||||
this.config = config;
|
||||
|
||||
if (!registered) {
|
||||
@@ -67,7 +64,7 @@ class Window {
|
||||
}
|
||||
|
||||
|
||||
public function create ():Void {
|
||||
public function create (application:Application):Void {
|
||||
|
||||
#if js
|
||||
|
||||
|
||||
Reference in New Issue
Block a user