Garry's Mod Wiki

Panel:SetAllowNonAsciiCharacters

Description

Configures a text input to allow user to type characters that are not included in the US-ASCII (7-bit ASCII) character set.

Characters not included in US-ASCII are multi-byte characters in UTF-8. They can be accented characters, non-Latin characters and special characters.

Arguments

1 boolean allowed
Set to true in order not to restrict input characters.

Example

Replaces the default vgui.Create() function to always allow non US-ASCII characters for text inputs.

if vgui.CreateStdRestrict == nil then vgui.CreateStdRestrict = vgui.Create end function vgui.Create( classname, parent, name ) local vgui_elt = vgui.CreateStdRestrict(classname, parent, name) if classname == "DTextEntry" or classname == "RichText" or classname == "TextEntry" then vgui_elt:SetAllowNonAsciiCharacters(true) end return vgui_elt end

Page Links


Special Pages


Wikis

?

Render Time: 34ms

DB GetPage 4
Generate Html 3
SaveChanges 13
Render Body 0
Render Sidebar 12