GUI
- backgroundColor
- BeginGroup
- BeginScrollView
- Box
- BringWindowToBack
- BringWindowToFront
- Button
- changed
- color
- contentColor
- depth
- DragWindow
- DrawTexture
- enabled
- EndGroup
- EndScrollView
- FocusControl
- FocusWindow
- GetNameOfFocusedControl
- GUI
- HorizontalScrollbar
- HorizontalSlider
- Label
- matrix
- PasswordField
- RepeatButton
- ScrollTo
- SelectionGrid
- SetNextControlName
- skin
- TextArea
- TextField
- Toggle
- Toolbar
- tooltip
- UnfocusWindow
- VerticalScrollbar
- VerticalSlider
- Window
GUI.contentColor 内容颜色
static var contentColor : Color
Description描述
Tinting color for all text rendered by the GUI.
This gets multiplied by color.
全局染色由GUI渲染的所有文本,得到乘以颜色。
参考:contentColor, color.
Yellow content color (font) in a button.
给你按钮中的字体应用黄色。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnGUI() {
GUI.contentColor = Color.yellow;
GUI.Button(new Rect(10, 110, 70, 30), "A button");
}
}
function OnGUI() {
//按钮的字母被染为黄色
GUI.contentColor = Color.yellow;
GUI.Button(Rect(10,110,70,30), "A button");
}
最后修改:2011年6月15日 Wednesday 10:51