Difference between revisions of "Window"
Jump to navigation
Jump to search
(Created page with "In Soda, <c>window</c> is an intrinsic module which provides an interface to the game window. == Properties == Soda code may both get and set the following propertie...") |
m (→Usage Notes) |
||
Line 22: | Line 22: | ||
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). | 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. | + | 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]], [[window.width]], or [[window.height]] will simply be ignored. |
[[Category:Soda]] | [[Category:Soda]] |
Revision as of 19:40, 5 August 2021
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, window.width, or window.height will simply be ignored.