EditorGUILayout.PrefixLabel 前置标签

static function PrefixLabel (label : string, followingStyle : GUIStyle = "Button") : void
static function PrefixLabel (label : string, followingStyle : GUIStyle, labelStyle : GUIStyle) : void
static function PrefixLabel (label : GUIContent, followingStyle : GUIStyle = "Button") : void
static function PrefixLabel (label : GUIContent, followingStyle : GUIStyle, labelStyle : GUIStyle) : void

Parameters参数

Description描述

Make a label in front of some control.

制作一个在某些控件前面的标签。

EditorGUILayout.PrefixLabel 前置标签

Simple window that shows the prefix label.
显示的前置标签。

class SimplePrefixLabelUsage extends EditorWindow {

	@MenuItem("Examples/PrefixLabel Usage")
	static function Init() {
		var window = GetWindow(SimplePrefixLabelUsage);
		window.Show();
	}

	function OnGUI() {
		var ammo : int = 0;
		EditorGUILayout.BeginHorizontal();
		EditorGUILayout.PrefixLabel("Ammo");
		target = EditorGUILayout.IntField(ammo);
		EditorGUILayout.EndHorizontal();
	}
}
Page last updated: 2011-7-14