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();
}
Page last updated: 2012-5-26