Skip to main content Skip to docs navigation

Game Window

Document not reviewed yet, might be outdated. Please, let us know if you find something invalid here.
On this page


browse to open an URL in the default internet browser

In order to open a URL with the default user Internet Browser:


alert/alertError to display a message

To display an alert message or exception with a native dialog:

views.gameWindow.alert("My message")
views.gameWindow.alertError(Exception("My error message"))



confirm to ask for a YES or NO

To ask the user to confirm an action with a native dialog:

val result: Boolean = views.gameWindow.confirm("My message")


prompt to ask for a text

You can use prompt to ask the user to type/prompt/input a string with a native dialog:

val result: String = views.gameWindow.prompt("My title", "default")


close to close the window

This will close the window.

openFileDialog to open a native file dialog

To ask the user to select to open one or more files, both for writing and/or reading with the native file dialog.

val selectedFiles: List<VfsFile> = views.gameWindow.openFileDialog(FileFilter("Images" to listOf("*.jpg", "*.jpg")), write = false, multi = true, currentDir = null)


Was this article useful?