GUI/Maximum window dimensions: Difference between revisions

Content added Content deleted
(Added Wren)
Line 1,031: Line 1,031:
{{out}}
{{out}}
<pre>Size of maximized borderless form: 1714x1143</pre>
<pre>Size of maximized borderless form: 1714x1143</pre>

=={{header|Wren}}==
{{libheader|DOME}}
<lang ecmascript>import "input" for Keyboard
import "dome" for Window, Process
import "graphics" for Canvas, Color

class Game {
static init() {
Canvas.print("Maximize the window and press 'm'", 0, 0, Color.white)
}

static update() {
if (Keyboard.isKeyDown("m") ) {
System.print("Maximum window dimensions are %(Window.width) x %(Window.height)")
Process.exit(0)
}
}

static draw(alpha) {}
}</lang>

{{out}}
<pre>
$ ./dome max_window_dimensions.wren
Maximum window dimensions are 1853 x 1018
</pre>


[[Category:Initialization]]
[[Category:Initialization]]