DgsCreateGradient: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Client function}} This function is for creating a gradient for DGS elements. ==Syntax== <syntaxhighlight lang="lua"> element dgsCreateLabel ( float color1, floa...")
 
mNo edit summary
Line 5: Line 5:
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
element dgsCreateLabel ( float color1, float color2, [ float direction = 1 ] )
element dgsCreateShader ( float color1, float color2, [ float direction = 1 ] )
</syntaxhighlight>
</syntaxhighlight>



Revision as of 14:27, 16 December 2020

This function is for creating a gradient for DGS elements.

Syntax

element dgsCreateShader ( float color1, float color2, [ float direction = 1 ] )

Required Arguments

  • color1: Gradient color 1
  • color2: Gradient color 2

Optional Arguments

  • direction: The direction in which gradient will follow. (1- left to right, 2- right to left, 3- top to bottom, 4- bottom to top)

Returns

Returns a shader if successful, false otherwise.