GuiSetInputEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Undo revision 23742 by Marcol07 (Talk))
(Undo revision 24360 by Cilyotri (Talk))
Line 17: Line 17:
<section name="Client" class="client" show="true">
<section name="Client" class="client" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
-- this creates a window with editable text box
--This line does...
window = guiCreateWindow(x,y,w,h,"Window",false)
blabhalbalhb --abababa
guiCreateEdit(x,y,w,h,"",false,window)
--This line does this...
-- and enables input focus
mooo
guiSetInputEnabled (true)
</syntaxhighlight>
</syntaxhighlight>
</section>
</section>

Revision as of 08:17, 15 August 2010

This function enables or disables input focus for the GUI. This means that any keybinds or MTA binds are overidden so that text can be input into an editbox, for example. In other words, keys such as t and y which activate the chatbox are disabled.

Syntax

bool guiSetInputEnabled ( bool enabled )

Required Arguments

  • enabled: true if input should go to GUI, false if it should go to the game.

Returns

Returns true if input mode could be changed, false if invalid parameters are passed.

Example

Click to collapse [-]
Client
--This line does...
blabhalbalhb --abababa
--This line does this...
mooo

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