GuiCreateButton: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 9: Line 9:
===Required Arguments===  
===Required Arguments===  
<!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type -->
<!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type -->
*'''argumentName:''' description
*'''x:''' The 2D x position of the GUI button on a player's screen
*'''y:''' The 2D y position of the GUI button on a player's screen
*'''width:''' The width of the GUI box
*'''height:''' The height of the GUI box
*'''text:''' The text you want the GUI box to display
*'''relative:''' ??????????????????????????????????????????????????


<!-- Only include this section below if there are optional arguments -->
<!-- Only include this section below if there are optional arguments -->
===Optional Arguments===  
===Optional Arguments===  
{{OptionalArg}}  
{{OptionalArg}}  
*'''argumentName2:''' description
*'''parent:''' ??????????????????????????????????????????????????
*'''argumentName3:''' description
*'''callback on_click:''' ??????????????????????????????????????????????????


===Returns===
===Returns===

Revision as of 04:41, 12 April 2007

This function is for creating a new GUI button

Syntax

element guiCreateButton ( float x, float y, float width, float height, string text, bool relative, [element parent, callback on_click ] )

Required Arguments

  • x: The 2D x position of the GUI button on a player's screen
  • y: The 2D y position of the GUI button on a player's screen
  • width: The width of the GUI box
  • height: The height of the GUI box
  • text: The text you want the GUI box to display
  • relative: ??????????????????????????????????????????????????

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.

  • parent: ??????????????????????????????????????????????????
  • callback on_click: ??????????????????????????????????????????????????

Returns

Returns true if blah, false otherwise.

Example

This example does...

--This line does...
blabhalbalhb --abababa
--This line does this...
mooo

See Also

General functions

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows

-- leave this unless you complete the function