Rishav Sharan
06/02/2020, 9:37 AMvar exitButton = textButton(256.0, 32.0) {
text = "Exit Game"
position(100, 400 + 32)
onClick {
sceneContainer.changeToAsync<PlayScene>()
}
enable()
}
Nico
06/02/2020, 9:39 AMRishav Sharan
06/02/2020, 10:10 AMNico
06/02/2020, 10:31 AMRishav Sharan
06/02/2020, 11:01 AMviews.actualVirtualWidth
Is that correct?
var exitButton = textButton(256.0, 32.0) {
text = "Exit"
position(views.actualVirtualWidth/2 - 128, 400 + 16)
onClick {
views.gameWindow.close()
}
enable()
}
2. How can i set the background color/image of a scene? I can change the bg of the entire game using `
views.clearColor = Colors.DARKGREEN
but want to do so for a specific sceneDeactivated User
06/02/2020, 1:50 PMview.dockedTo(Anchor.TOP_RIGHT)
If you plan to dock, for example a menu with several views, you can use a fixedSize container with a specific size as the view that is being dockedRishav Sharan
06/02/2020, 2:53 PM