GUIStyle
- active
- alignment
- border
- CalcHeight
- CalcMinMaxWidth
- CalcScreenSize
- CalcSize
- clipping
- contentOffset
- DrawCursor
- DrawWithTextSelection
- Draw
- fixedHeight
- fixedWidth
- focused
- fontSize
- fontStyle
- font
- GetCursorPixelPosition
- GetCursorStringIndex
- GUIStyle
- hover
- imagePosition
- lineHeight
- margin
- name
- none
- normal
- onActive
- onFocused
- onHover
- onNormal
- operator GUIStyle
- overflow
- padding
- stretchHeight
- stretchWidth
- wordWrap
GUIStyle.onActive 在激活时
var onActive : GUIStyleState
Description描述
Rendering settings for when the element is turned on and pressed down.
用于当元素被打开并且被按下时的渲染设置。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnGUI() {
if (GUI.skin.customStyles.Length > 0)
GUI.skin.customStyles[0].onActive.textColor = Color.yellow;
}
}
// Sets the text color to yellow of customStyles[0] when an
// element is turned on and pressed down
//当元素被打开并且被按下时,设置customStyles[0]的文本颜色为黄色
function OnGUI() {
if(GUI.skin.customStyles.Length > 0)
GUI.skin.customStyles[0].onActive.textColor = Color.yellow;
}
最后修改:2011年1月20日 Thursday 17:33