GuiGetInputEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 6: Line 6:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool guiGetInputEnabled ( )
bool guiGetInputEnabled ( )
</syntaxhighlight>  
</syntaxhighlight>
{{OOP||[[GUI widgets|GuiElement]].isInputEnabled|inputEnabled|guiSetInputEnabled}}


===Returns===
===Returns===
Line 26: Line 27:
==See Also==
==See Also==
{{GUI_functions}}
{{GUI_functions}}
{{GUI_events}}

Latest revision as of 17:16, 21 November 2018

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

Syntax

bool guiGetInputEnabled ( )

OOP Syntax Help! I don't understand this!

Method: GuiElement.isInputEnabled(...)
Variable: .inputEnabled
Counterpart: guiSetInputEnabled


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

Input

GUI