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:
{{Client event}}
{{Client event}}
__NOTOC__  
__NOTOC__  
This event happens when 'enter' key pressed
This event is triggered when enter is pressed on an editbox.


==Parameters==  
==Parameters==  

Revision as of 01:08, 22 April 2013

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 always the root element.

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

GUI events

Input

GUI


Client event functions