@@ -167,7 +167,7 @@ namespace user_interface_base {
167167 }
168168
169169 public addButtons ( btns : Button [ ] ) {
170- this . buttonGroups . push ( btns )
170+ this . buttonGroups [ 0 ] . concat ( btns )
171171 }
172172
173173 public move ( dir : CursorDir ) {
@@ -183,19 +183,12 @@ namespace user_interface_base {
183183 }
184184
185185 case CursorDir . Down : {
186- basic . showNumber ( this . row )
187- basic . showString ( "C" )
188- basic . showNumber ( this . col )
189-
190186 this . row = ( this . row + 1 ) % this . height ;
191187
192188 // Row below could have less cols, adjust if neccessary:
193189 if ( this . widths [ this . row ] <= this . col )
194190 this . col = this . widths [ this . row ] - 1
195191
196- basic . showNumber ( this . row )
197- basic . showString ( "C" )
198- basic . showNumber ( this . col )
199192 break
200193 }
201194
@@ -226,11 +219,7 @@ namespace user_interface_base {
226219
227220 const index = this . widths . slice ( 0 , this . row ) . reduce ( ( p , c ) => p + c , 0 )
228221
229- // basic.showString("S")
230- // basic.showNumber(this.buttonGroups[0].length)
231- // basic.showString("I")
232- // basic.showNumber(index + this.col)
233- const btn = this . buttonGroups [ 0 ] [ index + this . col - 1 ]
222+ const btn = this . buttonGroups [ 0 ] [ index + this . col ]
234223 this . reportAria ( btn )
235224 return btn
236225 }
0 commit comments