- BeginHorizontal
- BeginScrollView
- BeginToggleGroup
- BeginVertical
- BoundsField
- ColorField
- CurveField
- EndHorizontal
- EndScrollView
- EndToggleGroup
- EndVertical
- EnumPopup
- FloatField
- Foldout
- InspectorTitlebar
- IntField
- IntPopup
- IntSlider
- LabelField
- LayerField
- MinMaxSlider
- ObjectField
- PasswordField
- Popup
- PrefixLabel
- PropertyField
- RectField
- SelectableLabel
- Slider
- Space
- TagField
- TextArea
- TextField
- Toggle
- Vector2Field
- Vector3Field
- Vector4Field
EditorGUILayout.PasswordField 密码字段
static function PasswordField (password : string, params options : GUILayoutOption[]) : string
static function PasswordField (password : string, style : GUIStyle, params options : GUILayoutOption[]) : string
static function PasswordField (label : string, password : string, params options : GUILayoutOption[]) : string
static function PasswordField (label : string, password : string, style : GUIStyle, params options : GUILayoutOption[]) : string
static function PasswordField (label : GUIContent, password : string, params options : GUILayoutOption[]) : string
static function PasswordField (label : GUIContent, password : string, style : GUIStyle, params options : GUILayoutOption[]) : string
Parameters参数
-
labelOptional label in front of the toggle. // 开关按钮前面的可选标签。
-
passwordThe password to edit. // 编辑的密码
- styleOptional GUIStyle. // 可选样式
-
optionsAn optional list of layout options that specify extra layouting properties. Any values passed in here will override settings defined by the style. See Also: GUILayout.Width, GUILayout.Height, GUILayout.MinWidth, GUILayout.MaxWidth, GUILayout.MinHeight, GUILayout.MaxHeight, GUILayout.ExpandWidth, GUILayout.ExpandHeight
指定额外布局属性的可选列表。这里传递任意值,将覆盖样式定义的设置。
string - The password entered by the user.
返回字符串,用户输入的密码。
Description描述
Make a text field where the user can enter a password.
创建一个文本字段,在那里用户可以输入密码。
This works just like GUILayout.PasswordField, but correctly responds to select all, etc. in the editor, and it can have an optional label in front.
就像GUILayout.PasswordField,但正确响应select all等。在前面,它可以有一个可选标签。
Simple window that visualizes what you have typed in the password field.
可视化在密码字段有什么键入。
// Editor Script that creates a password field and lets you visualize what have you
// typed in a label.
//创建密码字段并可视化在密码字段有什么键入。
class EditorGUILayoutPasswordField extends EditorWindow {
var text : String = "Some text here";
@MenuItem("Examples/Editor Password field usage")
static function Init() {
var window = GetWindow(EditorGUILayoutPasswordField);
window.Show();
}
function OnGUI() {
text = EditorGUILayout.PasswordField("Type Something:",text);
EditorGUILayout.LabelField("Written Text:", text);
}
}