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参数

Returns

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等。在前面,它可以有一个可选标签。

EditorGUILayout.PasswordField 密码字段

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);
	}
}
Page last updated: 2011-7-12