OnClientGUISize: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
m (Minor improvements.)
Line 1: Line 1:
{{Client event}}
{{Client event}}
__NOTOC__  
__NOTOC__  
This event is triggered each time the user resizes a GUI element.
This event is triggered when the local client resizes a GUI element.


==Parameters==  
==Parameters==  
Line 7: Line 7:


==Source==
==Source==
The [[event system#Event source|source]] of this event is the GUI element which was resized.
The [[event system#Event source|source]] of this event is the GUI element that was resized.


==Example==  
==Example==  
This example would output to the chatbox what the player is resizing.
This example will output the type of GUI element that the client has resized, to the chatbox.
<syntaxhighlight lang="lua">addEventHandler("onClientGUISize",guiRoot,function()
<syntaxhighlight lang="lua">addEventHandler("onClientGUISize",guiRoot,function()
outputChatBox("You have resized :"..getElementType(source))
outputChatBox("You have resized a "..getElementType(source)..".",255,255,0)
end)
end)
</syntaxhighlight>
</syntaxhighlight>

Revision as of 20:59, 29 September 2012

This event is triggered when the local client resizes a GUI element.

Parameters

None

Source

The source of this event is the GUI element that was resized.

Example

This example will output the type of GUI element that the client has resized, to the chatbox.

addEventHandler("onClientGUISize",guiRoot,function()
	outputChatBox("You have resized a "..getElementType(source)..".",255,255,0)
end)

See Also

GUI events

Input

GUI


Client event functions

Shared