DTextEntry/SetNumeric

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{PanelFunc
 
{{PanelFunc
|Description=Enables or disables the numeric-only characters in the entry. (1234567890.-)
+
|Description=Sets whether or not to decline non-numeric characters as input.
 +
 
 +
Numeric characters are 1234567890.-
 
}}
 
}}
 
{{Arg
 
{{Arg
 
|type=boolean
 
|type=boolean
 
|name=numericOnly
 
|name=numericOnly
|desc=Whether to make the entry numeric only.
+
|desc=Whether to accept only numeric characters.
 
}}
 
}}
 
{{Example
 
{{Example

Latest revision as of 02:37, 22 June 2016

 DTextEntry:SetNumeric( )

Contents

DescriptionPanelFunc

Sets whether or not to decline non-numeric characters as input.

Numeric characters are 1234567890.-

Arguments

boolean numericOnly

Whether to accept only numeric characters.

Examples

Example

local TextEntry = vgui.Create( "DTextEntry" )
TextEntry:SetNumeric(true)

Output:

Only allow numeric characters.
Personal tools
Navigation