guiGetInputEnabled | Multi Theft Auto: Wiki Skip to content

guiGetInputEnabled

Client-side
Server-side
Shared

Pair: guiSetInputEnabled

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


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

OOP Syntax Help! I don't understand this!

  • Method: GuiElement.)(...)
  • Variable: .inputEnabled

Syntax

bool guiGetInputEnabled ( )

Returns

  • bool: value

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

Code Examples

shared

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

GUI Functions