返回介绍

GUI 界面

发布于 2019-12-18 15:37:45 字数 9011 浏览 1076 评论 0 收藏 0

class in UnityEngine

Description 描述

The GUI class is the interface for Unity's GUI with manual positioning.

界面类是Unity手工定制的GUI的接口。

Static Variables 静态变量

backgroundColorGlobal tinting color for all background elements rendered by the GUI.
全局染色由GUI渲染的所有背景元素.
changedReturns true if any controls changed the value of the input data.
如果任何控制按钮改变输入数据的值那么返回true。
colorGlobal tinting color for the GUI.
全局GUI染色,将影响背景和文本颜色。
contentColorTinting color for all text rendered by the GUI.
全局染色由GUI渲染的所有文本,得到乘以颜色。
depthThe sorting depth of the currently executing GUI behaviour.
当前执行的GUI行为的深度排序。
enabledIs the GUI enabled?
判断GUI是否启用了。
matrixThe GUI transform matrix.
GUI变换矩阵。
skinThe global skin to use.
全局皮肤使用。
tooltipThe tooltip of the control the mouse is currently over, or which has keyboard focus. (Read Only).
控制鼠标当前通过对象的提升信息,或具有键盘焦点。

Static Functions 静态函数

BeginGroupBegin a group. Must be matched with a call to EndGroup.
开始组,必须配套以EndGroup结束关闭容器。
BeginScrollViewBegin a scrolling view inside your GUI.
在你的GUI里,开始一个滚动视图, 注意BeginScrollView和EndScrollView它们是成对出现的。
BoxCreate a Box on the GUI Layer. A Box can contain text, an image, or a combination of these along with an optional tooltip, through using a GUIContent parameter. You may also use a GUIStyle to adjust the layout of items in a box, text colour and other properties.
在界面布局创建盒子。盒子包含文本,图像或者带有工具提示的这些的组合,通过使用GUIContent参数。你也可以使用GUIStyle去调整盒子中所有的物体的布局,文本颜色和其他属性。
BringWindowToBackBring a specific window to back of the floating windows.
使一个特定的窗口到浮动窗口的后面。
BringWindowToFrontBring a specific window to front of the floating windows.
使一个特定的窗口到浮动窗口的前面。
ButtonMake a single press button. The user clicks them and something happens immediately.
创建一个单次按下按钮。用户点击按钮事件立即触发。
DragWindowMake a window draggable.
创建一个可拖动窗口。
DrawTextureDraw a texture within a rectangle.
在矩形内绘制一个纹理。
DrawTextureWithTexCoordsDraw a texture within a rectangle with the given texture coordinates. Use this function for clipping or tiling the image within the given rectangle.
在给定的纹理坐标矩形范围内绘制纹理。使用该函数为了裁剪或者铺盖图像到指定的矩形内部。
EndGroupEnd a group.
结束组,和开数组BeginGroup成对使用。
EndScrollViewEnds a scrollview started with a call to BeginScrollView.
结束被开始的滚动视图,注意BeginScrollView和EndScrollView它们是成对出现的。
FocusControlMove keyboard focus to a named control.
移动键盘焦点到被命名的控件。
FocusWindowMake a window become the active window.
使一个窗口成为活动窗口。
GetNameOfFocusedControlGet the name of named control that has focus.
获取有焦点被命名控件的名字。
HorizontalScrollbarMake a horizontal scrollbar. Scrollbars are what you use to scroll through a document. Most likely, you want to use scrollViews instead.
创建水平滚动条。滚动条是能通过滚动来浏览文档,大多数情况下,你可以使用scrollView代替。
HorizontalSliderA horizontal slider the user can drag to change a value between a min and a max.
水平滑动条,用户能拖动改变最小和最大值之间。
LabelMake a text or texture label on screen.
在屏幕上创建一个文本或者纹理标签。
ModalWindowShow a Modal Window.
显示模式窗口。
PasswordFieldMake a text field where the user can enter a password.
创建文本字段,用户可以编辑密码。
RepeatButtonMake a button that is active as long as the user holds it down.
创建一个按钮,只要用户按着不放,将一直被激活。
ScrollToScrolls all enclosing scrollviews so they try to make position visible.
滚动scrollviews到position指定的位置,通俗来说就是把内容滚动到指定的坐标。
SelectionGridMake a grid of buttons.
创建一个网格按钮。
SetNextControlNameSet the name of the next control.
设置下一个控件的名字。
TextAreaMake a Multi-line text area where the user can edit a string.
创建多行文本区域,用户可以编辑字符串。
TextFieldMake a single-line text field where the user can edit a string.
创建单行文本字段,用户可以编辑字符串。
ToggleMake an on/off toggle button.
创建on/off开关按钮,也就是类似通常说的单选按钮。
ToolbarMake a toolbar.
创建工具栏。
UnfocusWindowRemove focus from all windows.
从所有窗口移除焦点。就是说是所有窗口处于不激活状态。
VerticalScrollbarMake a vertical scrollbar. Scrollbars are what you use to scroll through a document. Most likely, you want to use scrollViews instead.
创建垂直滚动条。滚动条是能通过滚动来浏览文档,大多数情况下,你可以使用scrollView代替。
VerticalSliderA vertical slider the user can drag to change a value between a min and a max.
垂直滑条指用户可以在最小和最大值之间拖动或者改变。
WindowMake a popup window.
创建一个弹出窗口。

Delegates 委托

WindowFunctionCallback to draw GUI within a window (used with GUI.Window).
在窗口内回调绘制GUI(和GUI.Window一起使用)。

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文