GetScreenWidth
From Spheriki
GetScreenWidth() returns the value in pixels of the current screen/game window width.
Contents |
[edit]
Usage
function GetScreenWidth();
[edit]
Examples
Abort("This game takes up " + GetScreenWidth() + " pixels of your screen.\n")
Aborts Sphere with the message of how wide the horizontal resolution of the game is.
var white = CreateColor(255,255,255); Rectangle(0, 0, GetScreenWidth(), 25, white);
This draws a white rectangle over the top part of the screen, in full width and 25 pixels height.
[edit]
Notes
If you don't configure your game, the screen width is 320 by default.
[edit]
See also
- GetScreenHeight()
- Abort()
- CreateColor()
- Rectangle()

