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.BeginHorizontal 开始水平组
static function BeginHorizontal (params options : GUILayoutOption[]) : Rect
static function BeginHorizontal (style : GUIStyle, params options : GUILayoutOption[]) : Rect
Parameters参数
-
styleOptional GUIStyle. // 可选样式
-
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描述
Begin a horizontal group and get its rect back.
开始一个水平组并获取返回矩形。
This is an extension to GUILayout.BeginHorizontal. It can be used for making compound controls
这是GUILayout.BeginHorizontal的扩展。它可以用于制作混合控件。
Horizontal Compound group.
水平混合组
// Create a Horizontal Compound Button
//创建一个水平混合按钮
class BeginEndHorizontalExample extends EditorWindow {
@MenuItem("Examples/Begin-End Horizontal usage")
static function Init() {
var window = GetWindow(BeginEndHorizontalExample);
window.Show();
}
function OnGUI() {
var r : Rect = EditorGUILayout.BeginHorizontal ("Button");
if (GUI.Button (r, GUIContent.none))
Debug.Log ("Go here");
GUILayout.Label ("I'm inside the button");
GUILayout.Label ("So am I");
EditorGUILayout.EndHorizontal ();
}
}
最后修改:2011年7月14日 Thursday 20:19