Window
Jump to navigation
Jump to search
In Soda, window
is an intrinsic module which provides an interface to the game window.
Properties
Soda code may both get and set the following properties on the window
module.
Property | Meaning |
---|---|
window.width | get/set the width of the window, in pixels |
window.height | get/set the height of the window, in pixels |
window.fullScreen | if true, game is in full-screen mode; if false, in window mode (where available) |
window.backColor | get/set background color of the window/screen |
Usage Notes
Assigning a new value to window.width or window.height also switches out of full-screen mode (rather than attempting to change the resolution of the display).
Some platforms may not support the full-screen switch, and may (for example) always be in full-screen mode. In that case attempts to assign a different value to window.fullScreen will simply be ignored.