@@ -66,11 +66,16 @@ var debugTax = 6;
6666var debugFrameRate : number ;
6767var debugTimer : number ;
6868
69- // (window as any).globals.w = new JSWindow(700, 500);
70- // (window as any).globals.w.container.closeButton = new TextButton(350, 250, "X", "center", 20, 5);
71- // (window as any).globals.w.container.closeButton.updateLanguage = function(){this.text="X"};
72- // (window as any).globals.w.visible = true;
73- // (window as any).globals.w.show();
69+ ( window as any ) . globals . w = new JSWindow ( 700 , 500 ) ;
70+ ( window as any ) . globals . w . container . closeButton = new TextButton ( 680 , 20 , "X" , "center" , 20 , 5 ) ;
71+ ( window as any ) . globals . w . container . closeButton . updateLanguage = function ( ) { this . text = "X" } ;
72+ ( window as any ) . globals . w . container . closeButton . onclick = ( ) => {
73+ ( window as any ) . globals . w . hide ( ) ;
74+ }
75+ ( window as any ) . globals . w . container . welcomemsg = new Label ( 350 , 250 , "Welcome! 😀" , "center" ) ;
76+ ( window as any ) . globals . w . container . welcomemsg . updateLanguage = function ( ) { this . text = "Welcome! 😀" } ;
77+ ( window as any ) . globals . w . visible = true ;
78+ ( window as any ) . globals . w . show ( ) ;
7479
7580//var gameState = "mainMenu"; /* 'mainMenu' 'game' 'options' */
7681/*------------------------------------LOOP-----------------------------------------*/
@@ -79,8 +84,8 @@ AnimationLOOP(function(){
7984 game . draw ( ) ;
8085 mainMenu . draw ( ) ;
8186 options . draw ( ) ;
82- // (window as any).globals.w.draw();
83- // (window as any).globals.w.updatePos();
87+ ( window as any ) . globals . w . draw ( ) ;
88+ ( window as any ) . globals . w . updatePos ( ) ;
8489 /*switch (gameState) {
8590 case 'game':
8691 lava.draw();
0 commit comments