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.onHover 在悬停时
var onHover : GUIStyleState
Description描述
Rendering settings for when the control is turned on and the mouse is hovering it.
用于当控件被打开并且鼠标悬停在上面时的渲染设置。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnGUI() {
if (GUI.skin.customStyles.Length > 0)
GUI.skin.customStyles[0].onHover.textColor = Color.cyan;
}
}
function OnGUI() {
if(GUI.skin.customStyles.Length > 0)
GUI.skin.customStyles[0].onHover.textColor = Color.cyan;
}
最后修改:2011年1月20日 Thursday 17:28