GuiEditIsMasked

From Multi Theft Auto: Wiki
Revision as of 17:42, 24 July 2018 by Myonlake (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function checks if an edit field is masked.

Syntax

bool guiEditIsMasked ( gui-edit editField )

Required Arguments

  • editField: The gui-edit to check masked flag of.

Returns

Returns true if the edit field is masked, false if not, nil if an invalid edit field was provided.

Example

function createPasswordEdit( )
    local password = guiCreateEdit( 0.845, 0.94, 0.15, 0.05, "password", true ) -- create edit field for the advert
    if password then -- if it was successfully created
        guiEditSetMasked( password, true ) -- make it masked
    end
    addCommandHandler( "isMasked",
        function( )
            local masked = guiEditIsMasked( advert ) -- check edit field masked flag
            outputChatBox( "Edit field is " .. ( masked and "masked" or "not masked" ) ) -- show info about edit field
        end
    )
end
addEventHandler( "onClientResourceStart", resourceRoot, createPasswordEdit )

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