File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ namespace user_interface_base {
88 screenToButton : ( x : number , y : number ) => Button
99 initialCursor : ( row : number , col : number ) => Button
1010 updateAria : ( ) => void
11+ drawComponents ( ) : void ;
1112 }
1213
1314 export const BACK_BUTTON_ERROR_KIND = "back_button"
@@ -41,6 +42,12 @@ namespace user_interface_base {
4142 this . buttonGroups . push ( btns )
4243 }
4344
45+ public drawComponents ( ) {
46+ this . buttonGroups . forEach ( row => {
47+ row . forEach ( btn => { btn . draw ( ) } )
48+ } )
49+ }
50+
4451 public screenToButton ( x : number , y : number ) : Button {
4552 const p = new Vec2 ( x , y )
4653 for ( let row = 0 ; row < this . buttonGroups . length ; row ++ ) {
@@ -226,14 +233,6 @@ namespace user_interface_base {
226233 return btn
227234 }
228235
229- public draw ( ) {
230- this . buttonGroups . forEach ( row => {
231- row . forEach ( btn => {
232- btn . draw ( )
233- } )
234- } )
235- }
236-
237236 public getCurrent ( ) : Button {
238237 return this . buttonGroups [ this . row ] [ this . col ] ;
239238 }
@@ -301,6 +300,8 @@ namespace user_interface_base {
301300 this . deleteButton = btn
302301 }
303302
303+ public drawComponents ( ) { }
304+
304305 getCurrent ( ) {
305306 // console.log(`row: ${this.row}, col: ${this.col}`)
306307 if ( this . row == - 1 ) {
You can’t perform that action at this time.
0 commit comments