Dgs/DgsDxCreateGridList: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 3: Line 3:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
element dgsDxCreateGridList( float x, float y, float width, float height, bool relative,[ element parent = nil] )
element dgsDxCreateGridList( float x, float y, float width, float height, bool relative,[ element parent = nil] )
</syntaxhighlight>  
</syntaxhighlight>
===Required Arguments===
[[Image:gui-gridlist.png|frame|Example Gridlist.]]
*'''x:''' A float of the 2D x position of the window on a player's screen. This is affected by the ''relative'' argument.
*'''y:''' A float of the 2D y position of the window on a player's screen. This is affected by the ''relative'' argument.
*'''width:''' A float of the width of the window. This is affected by the ''relative'' argument.
*'''height:''' A float of the height of the window. This is affected by the ''relative'' argument.
*'''relative:''' This is whether sizes and positioning are relative. If this is true, then all x, y, width and height floats must be between 0 and 1, representing sizes relative to the parent.
===Optional Arguments===  
===Optional Arguments===  
{{OptionalArg}}
{{OptionalArg}}

Revision as of 17:50, 1 July 2017

Syntax

Not completed

element dgsDxCreateGridList( float x, float y, float width, float height, bool relative,[ element parent = nil] )

Required Arguments

Example Gridlist.
  • x: A float of the 2D x position of the window on a player's screen. This is affected by the relative argument.
  • y: A float of the 2D y position of the window on a player's screen. This is affected by the relative argument.
  • width: A float of the width of the window. This is affected by the relative argument.
  • height: A float of the height of the window. This is affected by the relative argument.
  • relative: This is whether sizes and positioning are relative. If this is true, then all x, y, width and height floats must be between 0 and 1, representing sizes relative to the parent.

Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments. Not completed

  • parent: This is the parent that the DGS button is attached to. If the relative argument is true, sizes and positioning will be made relative to this parent. If the relative argument is false, positioning will be the number of offset pixels from the parent's origin. If no parent is passed, the parent will become the screen - causing positioning and sizing according to screen positioning.

Returns

Returns an element of the created gridlist if it was successfully created, false otherwise.