GuiEditIsMasked: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Client function}} __NOTOC__ {{New feature/item|3.0156|1.5.5||This function checks if an edit field is masked.}} ==Syntax== <syntaxhighlight lang="lua"> bool guiEditIsMaske...") |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Client function}} | {{Client function}} | ||
__NOTOC__ | __NOTOC__ | ||
{{New feature/item|3.0156|1.5.5||This function checks if an edit | {{New feature/item|3.0156|1.5.5||This function checks if an edit box is masked.}} | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool guiEditIsMasked ( gui-edit | bool guiEditIsMasked ( gui-edit guiEdit ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*''' | *'''guiEdit:''' the edit box to check masked flag of. | ||
===Returns=== | ===Returns=== | ||
Returns ''true'' if the edit | Returns ''true'' if the edit box is masked, ''false'' if not, ''nil'' if an invalid edit box was provided. | ||
==Example== | ==Example== | ||
Line 18: | Line 18: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function createPasswordEdit( ) | function createPasswordEdit( ) | ||
local password = guiCreateEdit( 0.845, 0.94, 0.15, 0.05, "password", true ) -- create edit | local password = guiCreateEdit( 0.845, 0.94, 0.15, 0.05, "password", true ) -- create edit box for a password | ||
if password then -- if it was successfully created | if password then -- if it was successfully created | ||
guiEditSetMasked( password, true ) -- make it masked | guiEditSetMasked( password, true ) -- make it masked | ||
Line 24: | Line 24: | ||
addCommandHandler( "isMasked", | addCommandHandler( "isMasked", | ||
function( ) | function( ) | ||
local masked = guiEditIsMasked( advert ) -- check edit | local masked = guiEditIsMasked( advert ) -- check the edit box masked flag | ||
outputChatBox( "Edit field is " .. ( masked and "masked" or "not masked" ) ) -- show info about edit | outputChatBox( "Edit field is " .. ( masked and "masked" or "not masked" ) ) -- show info about edit box | ||
end | end | ||
) | ) |
Revision as of 17:48, 24 July 2018
This function checks if an edit box is masked.
Syntax
bool guiEditIsMasked ( gui-edit guiEdit )
Required Arguments
- guiEdit: the edit box to check masked flag of.
Returns
Returns true if the edit box is masked, false if not, nil if an invalid edit box was provided.
Example
function createPasswordEdit( ) local password = guiCreateEdit( 0.845, 0.94, 0.15, 0.05, "password", true ) -- create edit box for a password if password then -- if it was successfully created guiEditSetMasked( password, true ) -- make it masked end addCommandHandler( "isMasked", function( ) local masked = guiEditIsMasked( advert ) -- check the edit box masked flag outputChatBox( "Edit field is " .. ( masked and "masked" or "not masked" ) ) -- show info about edit box end ) end addEventHandler( "onClientResourceStart", resourceRoot, createPasswordEdit )
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