GuiGetInputMode: Difference between revisions
Jump to navigation
Jump to search
m (→See Also) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 8: | Line 8: | ||
string guiGetInputMode ( ) | string guiGetInputMode ( ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[GUI widgets|GuiElement]].getInputMode|inputMode|guiSetInputMode}} | |||
===Returns=== | ===Returns=== | ||
Returns a string defining the current input mode, potential values are: | Returns a string defining the current input mode, potential values are: | ||
* '''"allow_binds":''' binds are enabled, hence using a key such as t in an editbox will still activate the chatbox | * '''"allow_binds":''' binds are enabled, hence using a key such as t in an editbox will still activate the chatbox | ||
* '''"no_binds":''' binds are disabled, hence using a key such as t in an editbox will | * '''"no_binds":''' binds are disabled, hence using a key such as t in an editbox will not activate the chatbox | ||
* '''"no_binds_when_editing":''' binds are always enabled except when an editable editbox or memo has input focus | * '''"no_binds_when_editing":''' binds are always enabled except when an editable editbox or memo has input focus | ||
Line 26: | Line 27: | ||
==Note== | ==Note== | ||
This function, introduced in 1.1, is '''not''' a replacement of [[guiGetInputEnabled]], indeed for the mode "no_binds_when_editing" the actual state of binds depends on the currently focused GUI widget. However: | This function, introduced in 1.1, is '''not''' a replacement of [[guiGetInputEnabled]], indeed for the mode ''"no_binds_when_editing"'' the actual state of binds depends on the currently focused GUI widget. However: | ||
* when ''guiGetInputMode ( )'' returns ''"allow_binds"'' you can be sure that ''guiGetInputEnabled ()'' will return ''false'' | * when ''guiGetInputMode ( )'' returns ''"allow_binds"'' you can be sure that ''guiGetInputEnabled ()'' will return ''false'' | ||
* when ''guiGetInputMode ( )'' returns ''"no_binds"'' you can be sure that ''guiGetInputEnabled ()'' will return ''true'' | * when ''guiGetInputMode ( )'' returns ''"no_binds"'' you can be sure that ''guiGetInputEnabled ()'' will return ''true'' | ||
Line 32: | Line 33: | ||
==See Also== | ==See Also== | ||
{{GUI_functions}} | {{GUI_functions}} | ||
{{GUI_events}} |
Latest revision as of 17:16, 21 November 2018
This function returns the current input mode as set by guiSetInputMode. Default mode is "allow_binds".
Syntax
string guiGetInputMode ( )
OOP Syntax Help! I don't understand this!
- Method: GuiElement.getInputMode(...)
- Variable: .inputMode
- Counterpart: guiSetInputMode
Returns
Returns a string defining the current input mode, potential values are:
- "allow_binds": binds are enabled, hence using a key such as t in an editbox will still activate the chatbox
- "no_binds": binds are disabled, hence using a key such as t in an editbox will not activate the chatbox
- "no_binds_when_editing": binds are always enabled except when an editable editbox or memo has input focus
Example
Click to collapse [-]
ClientaddCommandHandler( "checkmode", function () outputChatBox( string.format( "The current input mode is: '%s'", guiGetInputMode () ) ) end )
Note
This function, introduced in 1.1, is not a replacement of guiGetInputEnabled, indeed for the mode "no_binds_when_editing" the actual state of binds depends on the currently focused GUI widget. However:
- when guiGetInputMode ( ) returns "allow_binds" you can be sure that guiGetInputEnabled () will return false
- when guiGetInputMode ( ) returns "no_binds" you can be sure that guiGetInputEnabled () will return true
See Also
General functions
- guiBringToFront
- getChatboxLayout
- getChatboxCharacterLimit
- guiCreateFont
- guiBlur
- guiFocus
- guiGetAlpha
- guiGetCursorType
- guiGetEnabled
- guiGetFont
- guiGetInputEnabled
- guiGetInputMode
- guiGetPosition
- guiGetProperties
- guiGetProperty
- guiGetScreenSize
- guiGetSize
- guiGetText
- guiGetVisible
- guiMoveToBack
- guiSetAlpha
- guiSetEnabled
- guiSetFont
- guiSetInputEnabled
- guiSetInputMode
- guiSetPosition
- guiSetProperty
- guiSetSize
- guiSetText
- guiSetVisible
- isChatBoxInputActive
- isConsoleActive
- isDebugViewActive
- isMainMenuActive
- isMTAWindowActive
- isTransferBoxActive
- setChatboxCharacterLimit
- setDebugViewActive
Browsers
Buttons
Checkboxes
Comboboxes
- guiCreateComboBox
- guiComboBoxAddItem
- guiComboBoxClear
- guiComboBoxGetItemCount
- guiComboBoxGetItemText
- guiComboBoxGetSelected
- guiComboBoxIsOpen
- guiComboBoxRemoveItem
- guiComboBoxSetItemText
- guiComboBoxSetOpen
- guiComboBoxSetSelected
Edit Boxes
- guiCreateEdit
- guiEditGetCaretIndex
- guiEditGetMaxLength
- guiEditIsMasked
- guiEditIsReadOnly
- guiEditSetCaretIndex
- guiEditSetMasked
- guiEditSetMaxLength
- guiEditSetReadOnly
Gridlists
- guiCreateGridList
- guiGridListAddColumn
- guiGridListAddRow
- guiGridListAutoSizeColumn
- guiGridListClear
- guiGridListGetColumnCount
- guiGridListGetColumnTitle
- guiGridListGetColumnWidth
- guiGridListGetHorizontalScrollPosition
- guiGridListGetItemColor
- guiGridListGetItemData
- guiGridListGetItemText
- guiGridListGetRowCount
- guiGridListGetSelectedCount
- guiGridListGetSelectedItem
- guiGridListGetSelectedItems
- guiGridListGetSelectionMode
- guiGridListIsSortingEnabled
- guiGridListGetVerticalScrollPosition
- guiGridListInsertRowAfter
- guiGridListRemoveColumn
- guiGridListRemoveRow
- guiGridListSetColumnTitle
- guiGridListSetColumnWidth
- guiGridListSetHorizontalScrollPosition
- guiGridListSetItemColor
- guiGridListSetItemData
- guiGridListSetItemText
- guiGridListSetScrollBars
- guiGridListSetSelectedItem
- guiGridListSetSelectionMode
- guiGridListSetSortingEnabled
- guiGridListSetVerticalScrollPosition
Memos
- guiCreateMemo
- guiMemoGetCaretIndex
- guiMemoGetVerticalScrollPosition
- guiMemoSetVerticalScrollPosition
- guiMemoIsReadOnly
- guiMemoSetCaretIndex
- guiMemoSetReadOnly
Progressbars
Radio Buttons
Scrollbars
Scrollpanes
- guiCreateScrollPane
- guiScrollPaneGetHorizontalScrollPosition
- guiScrollPaneGetVerticalScrollPosition
- guiScrollPaneSetHorizontalScrollPosition
- guiScrollPaneSetScrollBars
- guiScrollPaneSetVerticalScrollPosition
Static Images
Tab Panels
Tabs
Text Labels
- guiCreateLabel
- guiLabelGetColor
- guiLabelGetFontHeight
- guiLabelGetTextExtent
- guiLabelSetColor
- guiLabelSetHorizontalAlign
- guiLabelSetVerticalAlign
Windows
Input
GUI
- onClientGUIAccepted
- onClientGUIBlur
- onClientGUIChanged
- onClientGUIClick
- onClientGUIComboBoxAccepted
- onClientGUIDoubleClick
- onClientGUIFocus
- onClientGUIMouseDown
- onClientGUIMouseUp
- onClientGUIMove
- onClientGUIScroll
- onClientGUISize
- onClientGUITabSwitched
- onClientMouseEnter
- onClientMouseLeave
- onClientMouseMove
- onClientMouseWheel