unity3D技术之EditorGUI.actionKey 动作键

unity3D技术

static var actionKey : bool

Description描述

Is the platform-dependent "action" modifier key held down? (Read Only) 有平台相关的”action”修改键被按下?(只读)【狗刨学习网】

The key is Command on Mac OS X, Control on Windows.

Mac OS X上为Command键,Windows上为Control (ctrl)键。

Action Key usage, key not pressed/key pressed.

动作键的用法,键按没按下/按下。

// Shows a password field with some "hidden" text.

//显示密码文本框,具有一些隐藏文本

// When the user presses the action key the password field becomes a text field.

//当用户点击action key,密码文本框转变为普通文本框

class EditorGUIActionKey extends EditorWindow {

var text : String = "This is some text";

@MenuItem("Examples/Show Hide password")

static function Init() {

var window = GetWindow(EditorGUIActionKey);

window.position = Rect(0, 0, 250, 60);

window.Show();

}

function OnGUI() {

// Show the contents 显示内容

if(EditorGUI.actionKey) {

unity3D技术之EditorGUI.actionKey 动作键的相关文档搜索

相关文档