GUISkin
- box
- button
- customStyles
- FindStyle
- font
- GetStyle
- horizontalScrollbarLeftButton
- horizontalScrollbarRightButton
- horizontalScrollbarThumb
- horizontalScrollbar
- horizontalSliderThumb
- horizontalSlider
- label
- scrollView
- settings
- textArea
- textField
- toggle
- verticalScrollbarDownButton
- verticalScrollbarThumb
- verticalScrollbarUpButton
- verticalScrollbar
- verticalSliderThumb
- verticalSlider
- window
GUISkin.textField 文本字段
var textField : GUIStyle
Description描述
Style used by default for GUI.TextField controls.
用于GUI.TextField控件的默认样式。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public GUIStyle style;
private string str = "A string...";
void OnGUI() {
GUI.skin.textField = style;
str = GUILayout.TextField(str);
}
}
// Modifies only the textField style of the current GUISkin
//修改当前GUISkin的textField样式
var style : GUIStyle;
private var str : String = "A string...";
function OnGUI() {
GUI.skin.textField = style;
str = GUILayout.TextField(str);
}
最后修改:2011年1月25日 Tuesday 15:57