Help to understand, there is a code:
button.addListener(object : InputListener() { override fun touchDown(event: InputEvent?, x: Float, y: Float, pointer: Int, button: Int): Boolean { object : Dialog("window") { init { ... } } .show() .addListener(object : InputListener() { override fun touchDown(event: InputEvent?, x: Float, y: Float, pointer: Int, button: Int): Boolean { if (...) { ??-->> dialog.hide() } return true } }); } } How to write the dialog.hide() line correctly in it to refer to the created object? (Dialog ("window"))