An utility to create different scenes or screens for different UI layouts, for example a main menu and a option menu.
Do not use Koui.add()
in scenes! It will work but it ignores the current
scene.
Internally, a scene is just a AnchorPane
that is only visible if the scene
is active. Only one scene can be active at once.
See also:
Static variables
Static methods
staticaddScene(name:String, onSetup:AnchorPane ‑> Void):Void
Adds a scene. For setup, please use the add()
function of the
AnchorPane
parameter of the onSetup
callback.
Parameters:
name | The name of the new scene for later reference |
---|---|
onSetup | A callback that creates the UI for the scene |