DgsCenterElement

From Multi Theft Auto: Wiki
Revision as of 18:05, 21 April 2020 by Temois (talk | contribs) (→‎Syntax)
Jump to navigation Jump to search

Syntax

element dgsCenterElement ( element[, bool remainX, bool remainY] )

Required Arguments

Example Dx Window.
  • 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.
  • titleBarText: A string of the text that will be displayed in the title bar of the window.
  • relative: This is whether sizes and positioning are relative. If this is true, then all x,y,width,height floats must be between 0 and 1, representing sizes/positions as a fraction of the screen size. If false, then the size and co-ordinates are based on client's resolution, accessible using guiGetScreenSize.

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.

  • titlenamecolor: An int of the color of the title text of the window.
  • titsize: A float of the height of the title of the window.
  • titimg: A texture element of the background of the title of the window.
  • titcolor: An int of the color of the title of the window.
  • bgimg: A texture element of the background of the body of the window.
  • bgcolor: An int of the background color of the body of the window.
  • sidesize: A float of the side of the window that affects window sizing.
  • nooffbutton : A bool of whether the window is created without close button.

Returns

Returns a dgs window element if it was created successfully, false otherwise.