11namespace user_interface_base {
2-
2+
33 const INPUT_PRIORITY = 10
44 const UPDATE_PRIORITY = 20
55 const RENDER_PRIORITY = 30
66 const SCREEN_PRIORITY = 100
77
8- export abstract class Scene implements IComponent {
8+ export abstract class Scene implements IComponent {
99 private xfrm_ : Affine
1010 private color_ : number
1111 private backgroundCaptured_ = false
@@ -39,7 +39,7 @@ namespace user_interface_base {
3939 }
4040 }
4141
42- /* abstract */ shutdown ( ) { }
42+ /* abstract */ shutdown ( ) { }
4343
4444 /* override */ activate ( ) {
4545 profile ( )
@@ -49,15 +49,15 @@ namespace user_interface_base {
4949 profile ( )
5050 }
5151
52- /* abstract */ update ( ) { }
52+ /* abstract */ update ( ) { }
5353
54- /* abstract */ draw ( ) { }
54+ /* abstract */ draw ( ) { }
5555
56- protected handleClick ( x : number , y : number ) { }
56+ protected handleClick ( x : number , y : number ) { }
5757
58- protected handleMove ( x : number , y : number ) { }
58+ protected handleMove ( x : number , y : number ) { }
5959
60- protected handleWheel ( dx : number , dy : number ) { }
60+ protected handleWheel ( dx : number , dy : number ) { }
6161
6262 get backgroundCaptured ( ) {
6363 return ! ! this . backgroundCaptured_
@@ -113,16 +113,33 @@ namespace user_interface_base {
113113
114114 public pushScene ( scene : Scene ) {
115115 const currScene = this . currScene ( )
116+ basic . showNumber ( 9 )
117+
116118 if ( currScene ) {
117119 currScene . deactivate ( )
118120 }
121+ basic . showNumber ( 0 )
119122 context . pushEventContext ( )
120123 this . scenes . push ( scene )
124+ basic . showNumber ( 1 )
121125 scene . startup ( )
126+ basic . showNumber ( 2 )
122127 scene . activate ( )
123128 scene . __init ( )
124129 }
125130
131+ // public pushScene(scene: Scene) {
132+ // const currScene = this.currScene()
133+ // if (currScene) {
134+ // currScene.deactivate()
135+ // }
136+ // context.pushEventContext()
137+ // this.scenes.push(scene)
138+ // scene.startup()
139+ // scene.activate()
140+ // scene.__init()
141+ // }
142+
126143 public popScene ( ) {
127144 const prevScene = this . scenes . pop ( )
128145 if ( prevScene ) {
0 commit comments