Graphics::set2dLayer: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Called before drawing stuff.<br><br>Examples:<br>GRAPHICS::_61BB1D9B3A95D802(7);<br>GRAPHICS::DRAW_RECT(0.5, 0.5, 3.0, 3.0, v_4, v_5, v_6, a_0._f172, 0);<br><br>GRAPHICS::_61BB1D9B3A95D802(1);<br>GRAPHICS::DRAW_RECT(0.5, 0.5, 1.5, 1.5, 0, 0, 0, 255, 0);<br><br>Appears to be the layer it's drawn on <br>
==Prodcedure==
Must be called before drawing a rectangle, text, etc.
Lowest number is below everything else. Highest number is above everything else.
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">mp.game.graphics.set2dLayer(layer);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.graphics.set2dLayer(layer);</syntaxhighlight>
Line 8: Line 10:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// todo
mp.game.graphics.set2dLayer(1);
mp.game.graphics.drawRect();
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Graphics_s_function_c}}
{{Graphics_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 22:17, 27 July 2018

Prodcedure

Must be called before drawing a rectangle, text, etc. Lowest number is below everything else. Highest number is above everything else.

Syntax

mp.game.graphics.set2dLayer(layer);

Required Arguments

  • layer: int

Return value

  • Undefined

Example

mp.game.graphics.set2dLayer(1);
mp.game.graphics.drawRect();

See also