Skip to content

Commit d30e1d2

Browse files
committed
fix
1 parent 91fc6a2 commit d30e1d2

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

navigator.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)