OnClientGUIAccepted: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
 
(9 intermediate revisions by 6 users not shown)
Line 1: Line 1:
[[Category:Incomplete Event]]
{{Client event}}
 
__NOTOC__  
__NOTOC__  
This event is blahblah and is used for blahblah.
This event is triggered when enter is pressed on an editbox.


==Syntax==  
==Parameters==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
void onClientGUIAccepted ( element theElement )
element editBox
</syntaxhighlight>  
</syntaxhighlight>
* '''editBox''': the [[Element/GUI/Edit_field|editbox]] which had focus.
 
==Source==
The [[event system#Event source|source]] of this event is the editbox which enter was pressed on.


==Example==  
==Example==  
This example does...
This example creates an editbox and prints a message when enter is pressed.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
editBox = guiCreateEdit ( 0.3, 0.1, 0.4, 0.1, "", true )
blabhalbalhb --abababa
addEventHandler( "onClientGUIAccepted", editBox,
--This line does this...
    function( theElement )
mooo
        outputChatBox( guiGetText( theElement ) )
    end
)
</syntaxhighlight>
</syntaxhighlight>
[[pl:onClientGUIAccepted]]
==See Also==
{{GUI_events}}
===Client event functions===
{{Client_event_functions}}

Latest revision as of 14:29, 20 May 2018

This event is triggered when enter is pressed on an editbox.

Parameters

element editBox
  • editBox: the editbox which had focus.

Source

The source of this event is the editbox which enter was pressed on.

Example

This example creates an editbox and prints a message when enter is pressed.

editBox = guiCreateEdit ( 0.3, 0.1, 0.4, 0.1, "", true )
addEventHandler( "onClientGUIAccepted", editBox,
    function( theElement ) 
        outputChatBox( guiGetText( theElement ) )
    end
)

See Also

Input

GUI


Client event functions

Shared