Graphics::getScreenActiveResolution: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
No edit summary
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{ClientsideJsEvent}}
Returns current screen resolution.
Returns current screen resolution.
==Syntax==
{{JSContainer|
<syntaxhighlight lang="javascript">graphics.getScreenActiveResolution(x, y);</syntaxhighlight>
===Syntax===
=== Required Arguments ===
<pre>
*'''x:''' int
mp.game.graphics.getScreenActiveResolution();
*'''y:''' int
</pre>
 
===Return value===
===Return value===
*'''object:''' x, y
*'''x:''' number
==Example==
*'''y:''' number
<syntaxhighlight lang="javascript">
 
todo
{{Example}}
</syntaxhighlight>
<pre>
let x = mp.game.graphics.getScreenActiveResolution().x; // Saves the width of the active resolution in x
</pre>
}}
 
 
==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 20:48, 13 November 2022

Client-Side
Event

 JavaScript



Returns current screen resolution.

JavaScript Syntax

Syntax

mp.game.graphics.getScreenActiveResolution();

Return value

  • x: number
  • y: number

Example

let x = mp.game.graphics.getScreenActiveResolution().x; // Saves the width of the active resolution in x



See also