Skip to content

Commit

Permalink
Fix listener for text button
Browse files Browse the repository at this point in the history
  • Loading branch information
Dgzt committed Jul 21, 2024
1 parent 3562efc commit c02d334
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ class RootWidgetImpl : VisTable(), RootWidget {

override fun addTextButton(text: String, listener: ButtonListener): Cell {
val button = VisTextButton(text)
button.addListener(object : ClickListener() {
override fun clicked(event: InputEvent, x: Float, y: Float) {
listener.clicked()
}
})

val cell = add(button)
return CellImpl(cell)
}
Expand Down

0 comments on commit c02d334

Please sign in to comment.