OnClientGUIAccepted: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
[[Category:Incomplete Event]]
{{Client event}}
 
__NOTOC__  
__NOTOC__  
This event is blahblah and is used for blahblah.
This event is fired 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 editbox which had focus.
==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, function(element)
--This line does this...
  outputChatBox(guiGetText(element))
mooo
end)
</syntaxhighlight>
</syntaxhighlight>
==See Also==
===GUI events===
{{GUI_events}}
===Client event functions===
{{Client_event_functions}}

Revision as of 18:36, 13 January 2008

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

Parameters

element editBox
  • editBox: The editbox which had focus.

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(element) 
   outputChatBox(guiGetText(element))
end)

See Also

GUI events

Input

GUI


Client event functions