Difference between revisions of "Legacy:GetScreenHeight"

From Spherical
Jump to: navigation, search
(created from http://web.archive.org/web/20120504055855/http://www.spheredev.org/wiki/GetScreenHeight)
 
(filled)
 
Line 1: Line 1:
 
 
 
GetScreenHeight() returns the value in pixels of the current screen/game window height.
 
GetScreenHeight() returns the value in pixels of the current screen/game window height.
  
Line 6: Line 4:
  
 
==Usage==
 
==Usage==
{{Usage|returns=integer|object={{{object}}}|func=GetScreenHeight|params={{{params}}}}}
+
{{Usage|returns=integer|func=GetScreenHeight}}
  
* '''param1''' type. param1 description
+
==Examples==
* '''param2''' type. param2 description
+
<syntaxhighlight>
* '''paramN''' type. paramN description
+
Abort("This game takes up " + GetScreenHeight() + " vertical pixels of your screen.\n")
 +
</syntaxhighlight>
 +
Aborts Sphere with the message of how high the horizontal resolution of the game is.
  
==Examples==
+
<syntaxhighlight>
(examples with syntaxhighlighted code)
+
var white = CreateColor(255,255,255);
 +
Rectangle(0, 0, 25, GetScreenHeight(), white);
 +
</syntaxhighlight>
 +
This draws a white rectangle over the left part of the screen, in full height and 25 pixels width.
  
 
==Notes==
 
==Notes==
(notes)
+
If you don't configure your game, the screen height is 240 by default.
  
 
==See also==
 
==See also==
* see also
+
* [[API:GetScreenWidth|GetScreenWidth]]()
* see also
+
* [[API:Abort|Abort]]()
* see also
+
* [[API:CreateColor|CreateColor]]()
* etc
+
* [[API:Rectangle|Rectangle]]()
  
 
{{API:Video/navbox}}
 
{{API:Video/navbox}}

Latest revision as of 21:23, 4 June 2013

GetScreenHeight() returns the value in pixels of the current screen/game window height.

Usage

integer GetScreenHeight();


Examples

Abort("This game takes up " + GetScreenHeight() + " vertical pixels of your screen.\n")

Aborts Sphere with the message of how high the horizontal resolution of the game is.

var white = CreateColor(255,255,255);
Rectangle(0, 0, 25, GetScreenHeight(), white);

This draws a white rectangle over the left part of the screen, in full height and 25 pixels width.

Notes

If you don't configure your game, the screen height is 240 by default.

See also

API:Video/navbox