GUILayout
- BeginArea
- BeginHorizontal
- BeginScrollView
- BeginVertical
- Box
- Button
- EndArea
- EndHorizontal
- EndScrollView
- EndVertical
- ExpandHeight
- ExpandWidth
- FlexibleSpace
- Height
- HorizontalScrollbar
- HorizontalSlider
- Label
- MaxHeight
- MaxWidth
- MinHeight
- MinWidth
- PasswordField
- RepeatButton
- SelectionGrid
- Space
- TextArea
- TextField
- Toggle
- Toolbar
- VerticalScrollbar
- VerticalSlider
- Width
- Window
GUILayout.ExpandWidth 液态宽度
static function ExpandWidth (expand : bool) : GUILayoutOption
Description描述
Option passed to a control to allow or disallow horizontal expansion.
传递给控件是否允许水平方向液化的选项。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnGUI() {
GUILayout.BeginVertical();
GUILayout.Button("Short Button", GUILayout.ExpandWidth(false));
GUILayout.Button("Very very long Button");
GUILayout.EndVertical();
}
}
function OnGUI () { GUILayout.BeginVertical(); GUILayout.Button("Short Button", GUILayout.ExpandWidth(false)); GUILayout.Button("Very very long Button"); GUILayout.EndVertical(); }
最后修改:2011年1月14日 Friday 19:23