EditorGUILayout
- 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.LabelField 标签字段
static function LabelField (label : string, label2 : string, params options : GUILayoutOption[]) : void
Parameters参数
-
labelLabel in front of the label field. // 在标签字段前面的标签
-
label2The label to show to the right. // 显示在右侧的标签
-
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
指定额外布局属性的可选列表。这里传递任意值,将覆盖样式定义的设置。
Description描述
Make a label field. (Useful for showing read-only info.)
制作一个标签字段。(通常用于显示只读信息)
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();
}
}
最后修改:2011年7月12日 Tuesday 15:23