Window()
The Window class represents a singleton window for the application. It provides various constructors to create a window with different configurations such as dimensions, full screen mode, and asset paths. The class ensures that only one instance of the window can be created at any time.
The class also provides methods to interact with the window and the application, such as retrieving the window dimensions, setting the debug mode, managing stages, and exiting the application.
Example usage:
Window window = new Window();
window.setDebug(true);
Examples
Syntax
Java
new Window()
new Window(assets)
new Window(width, height)
new Window(width, height, assets)
Static Fields
| Name | Type | Description |
|---|---|---|
DEBUG_COLOR |
int[] | The default color used for debugging purposes. You can modify this array to change the debug color. Debug mode can be toggled at runtime by pressing F12. For example, to set the debug color to green, you can do: ```java Window.DEBUG_COLOR = new int[] { 0, 255, 0 }; ``` |