EditorGUILayout.LabelField 标签字段

static function LabelField (label : string, label2 : string, params options : GUILayoutOption[]) : void

Parameters参数

Description描述

Make a label field. (Useful for showing read-only info.)

制作一个标签字段。(通常用于显示只读信息)

EditorGUILayout.LabelField 标签字段

Shows a label in the editor (Label) with the seconds since the editor started (Label2).

在编辑器显示一个标签,带有自编辑器开始秒数。

// Shows a label in the editor with the seconds since the editor started

//在编辑器显示一个标签,带有自编辑器开始的秒数

class EditorGUILayoutLabel extends EditorWindow {

	@MenuItem("Examples/Editor GUILayout Label Usage")

	static function Init() {

		var window = GetWindow(EditorGUILayoutLabel);

		window.Show();

	}

	function OnGUI() {

		EditorGUILayout.LabelField("Time since start: ",

		EditorApplication.timeSinceStartup.ToString());

		this.Repaint();

	}

}
Page last updated: 2011-7-12