GuiGetInputEnabled: 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__
This function checks whether user input is going to the GUI or the game.
{{Client function}}
This function checks whether user input is focused on the GUI or the game.


==Syntax==  
==Syntax==  
Line 8: Line 9:


===Returns===
===Returns===
Returns ''true'' if input is going to GUI, ''false'' if it's going to the game.
Returns ''true'' if input is focused on GUI, ''false'' if it's focused on the game.


==Example==  
==Example==  
This example does...
This example adds a command with which you can check whether the input is focused on GUI or game.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
addCommandHandler( "checkinput", function ()
blabhalbalhb --abababa
    if guiGetInputEnabled( ) then
--This line does this...
        outputChatBox( "Your input focus is currently on GUI." )
mooo
    else
        outputChatBox( "Your input focus is currently on game." )
    end
end )
 
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==
{{GUI_functions}}
{{GUI_functions}}
[[Category:Incomplete]]

Revision as of 20:15, 28 March 2008

This function checks whether user input is focused on the GUI or the game.

Syntax

bool guiGetInputEnabled ( )

Returns

Returns true if input is focused on GUI, false if it's focused on the game.

Example

This example adds a command with which you can check whether the input is focused on GUI or game.

addCommandHandler( "checkinput", function ()
    if guiGetInputEnabled( ) then
        outputChatBox( "Your input focus is currently on GUI." )
    else 
        outputChatBox( "Your input focus is currently on game." )
    end
end )

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