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.backgroundColor 背景颜色
static var backgroundColor : Color
Description描述
Global tinting color for all background elements rendered by the GUI.
This gets multiplied by color.
全局染色由GUI渲染的所有背景元素,得到乘以颜色。
参考: contentColor, color.
Yellow Background color applied to a button.
应用给按钮一个黄色背景颜色。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnGUI() {
GUI.backgroundColor = Color.yellow;
GUI.Button(new Rect(10, 110, 70, 30), "A button");
}
}
function OnGUI() {
GUI.backgroundColor = Color.yellow;
GUI.Button(Rect(10,110,70,30), "A button");
}
最后修改:2011年6月15日 Wednesday 10:54