GuiGetPosition: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
<!-- Describe in plain english what this function does. Don't go into details, just give an overview -->
This function allows retrieval of a GUI element's current position on the screen
This fake function is for use with blah & blah and does blahblahblabhalbhl


==Syntax==  
==Syntax==  
<!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd -->
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
float float guiGetPosition ( element guielement )
float float guiGetPosition ( element guiElement, bool relative )
</syntaxhighlight>  
</syntaxhighlight>  


===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 -->
*'''guiElement:''' The gui element of which you wish to retrieve the position.
*'''argumentName:''' description
*'''relative:''' A boolean representing whether the position should be relative to the element's parent, or absolute pixel position.


<!-- Only include this section below if there are optional arguments -->
===Returns===
===Optional Arguments===  
Returns two floats of the ''x'' and ''y'' positions of the position of the element on the screen, or false if the position could not be retrieved.
{{OptionalArg}}
*'''argumentName2:''' description
*'''argumentName3:''' description


===Returns===
<!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check -->
Returns ''true'' if blah, ''false'' otherwise.
*x
*y
==Example==  
==Example==  
<!-- Explain what the example is in a single sentance -->
<!-- Explain what the example is in a single sentance -->
Line 36: Line 26:


==See Also==
==See Also==
<!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc -->
{{GUI_functions}}
{{FunctionArea_functions}}
[[Category:Need_Syntax]]  -- leave this until syntax is available. Cannot document the function or event without syntax.
[[Category:Incomplete]] -- leave this unless you complete the function
[[Category:Incomplete]] -- leave this unless you complete the function

Revision as of 15:06, 11 August 2007

This function allows retrieval of a GUI element's current position on the screen

Syntax

float float guiGetPosition ( element guiElement, bool relative )

Required Arguments

  • guiElement: The gui element of which you wish to retrieve the position.
  • relative: A boolean representing whether the position should be relative to the element's parent, or absolute pixel position.

Returns

Returns two floats of the x and y positions of the position of the element on the screen, or false if the position could not be retrieved.

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