Graphics::getScreenResolution: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
m (Improved the return value formatting)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
int screenresx,screenresy;<br>GET_SCREEN_RESOLUTION(&amp;screenresx,&amp;screenresy);
int screenresx,screenresy;<br>GET_SCREEN_RESOLUTION(&amp;screenresx,&amp;screenresy);
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">graphics.getScreenResolution(x, y);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.graphics.getScreenResolution(x, y);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''x:''' int
*'''x:''' int
Line 7: Line 7:
===Return value===
===Return value===
*'''object:''' x, y
*'''object:''' x, y
==Example==
{{info|The returned object seems to be static.
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="json">
todo
{ "x": 1280, "y": 720 }
</syntaxhighlight>
</syntaxhighlight>}}
==See also==
==See also==
{{Graphics_function_c}}
{{Graphics_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 19:35, 12 November 2019

int screenresx,screenresy;
GET_SCREEN_RESOLUTION(&screenresx,&screenresy);

Syntax

mp.game.graphics.getScreenResolution(x, y);

Required Arguments

  • x: int
  • y: int

Return value

  • object: x, y

The returned object seems to be static.

{ "x": 1280, "y": 720 }

See also