您的位置:首页 > 移动开发 > Unity3D

Unity学习笔记(3) --- Unity的界面排版:初识GUILayout

2015-12-11 15:37 495 查看

GUILayout 界面布局

相关文档:GUILayout

The GUILayout class is the interface for Unity gui with automatic layouting.GUILayout类是用于GUI自动布局的接口。

Class Functions类函数

LabelMake an auto-layout label.
创建一个自动布局的标签。
BoxMake an auto-layout box.
创建一个自动布局的box。
ButtonMake a single press button. The user clicks them and something happens immediately.
创建一个单次按钮。当用户点击按钮会立即发生一些事件。
RepeatButtonMake a repeating button. The button returns true as long as the user holds down the mouse
创建一个重复按钮。当用户点击按钮会立即发生一些事件。只要用户按住鼠标,按钮返回true。
TextFieldMake a single-line text field where the user can edit a string.
创建一个单行文本字段,用户可以编辑其中的字符串。
PasswordFieldMake a text field where the user can enter a password.
创建一个单行密码文本字段,用户可以输入密码。
TextAreaMake a multi-line text field where the user can edit a string.
创建一个多行密码文本区域,用户可以编辑其中字符串。
ToggleMake an on/off toggle button.
创建一个开关按钮。
ToolbarMake a toolbar
创建一个工具栏。
SelectionGridMake a Selection Grid
创建一个选择表格。
HorizontalSliderA horizontal slider the user can drag to change a value between a min and a max.
创建一个水平滑动条,用户可以拖动改变在最小和最大值之间的值。
VerticalSliderA vertical slider the user can drag to change a value between a min and a max.
创建一个垂直滑动条,用户可以拖动改变在最小和最大值之间的值。
HorizontalScrollbarMake a hopriztonal scrollbar. Scrollbars are what you use to scroll through a document. Most likely, you want to use scroll views instead.

创建水平滚动条。滚动条是能通过滚动来浏览文档,大多数情况下,你可以使用scrollView代替。
VerticalScrollbarMake a vertical scrollbar. Scrollbars are what you use to scroll through a document. Most likely, you want to use scrollViews instead.

创建垂直滚动条。滚动条是能通过滚动来浏览文档,大多数情况下,你可以使用scrollView代替。
SpaceInsert a space in the current layout group.
在当前层组插入空白。
FlexibleSpaceInsert a flexible space element.
插入一个弹性空白元素。
BeginHorizontalBegin a Horizontal control group.
开始一个水平控件的组。
EndHorizontalClose a group started with BeginHorizontal
关闭由BeginHorizontal开始的一个组。
BeginVerticalBegin a vertical control group.
开始一个垂直控件的组。
EndVerticalClose a group started with BeginVertical
关闭由BeginVertical开始的一个组。
BeginAreaBegin a GUILayout block of GUI controls in a fixed screen area.
在屏幕上开始一个固定大小的布局区域。
EndAreaClose a GUILayout block started with BeginArea
关闭由BeginArea开始GUILayout布局块。
BeginScrollViewBegin an automatically laid out scrollview.
开始一个自动布局滚动视图。
EndScrollViewEnd a scroll view begun with a call to BeginScrollView.
结束一个由BeginScrollView开始的滚动视图。
WindowMake a popup window that layouts its contents automatically.
创建一个弹出窗口,它的内容是自动布局的。
WidthOption passed to a control to give it an absolute width.
传递给控件的选项,给它一个绝对的宽度。
MinWidthOption passed to a control to specify a minimum width.
传递给控件指定一个最小宽度的选项。
MaxWidthOption passed to a control to specify a maximum width.
传递给控件指定一个最大宽度的选项。
HeightOption passed to a control to give it an absolute height.
传递给控件的选项,给它一个绝对的高度。
MinHeightOption passed to a control to specify a minimum height.
传递给控件指定一个最小高度的选项。
MaxHeightOption passed to a control to specify a maximum height.
传递给控件指定一个最大高度的选项。
ExpandWidthOption passed to a control to allow or disallow horizontal expansion.
传递给控件是否允许水平液态方向的选项。
ExpandHeightOption passed to a control to allow or disallow vertical expansion.
传递给控件是否允许垂直液态方向的选项。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: