GUIStyle.stretchWidth 拉伸宽度

var stretchWidth : bool

Description描述

Can GUI elements of this style be stretched horizontally for better layouting?

为更好的布局这个样式的GUI元素可以水平拉伸么?

using UnityEngine;

using System.Collections;



public class example : MonoBehaviour {

	void OnGUI() {

		if (GUI.skin.customStyles.Length > 0)

			GUI.skin.customStyles[0].stretchWidth = true;



	}

}
function OnGUI() {

	if(GUI.skin.customStyles.Length > 0)

		GUI.skin.customStyles[0].stretchWidth = true;

}
Page last updated: 2011-1-23