GUI和GUILayout是Unity提供的UIKit。在使用GUI的Controls时都要求设置Rect參数。没办法做到自己主动排版,给适配带来难度。而GUILayout的设计就是为了弥补这个缺陷,GUILayout是在GUI的基础之上复合了一套Layout的排版逻辑。

GUI

class in UnityEngine

Description

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

See Also: GUI tutorial.

Static Variables

backgroundColor Global tinting color for all background elements rendered by the GUI.
changed Returns true if any controls changed the value of the input data.
color Global tinting color for the GUI.
contentColor Tinting color for all text rendered by the GUI.
depth The sorting depth of the currently executing GUI behaviour.
enabled Is the GUI enabled?
matrix The GUI transform matrix.
skin The global skin to use.
tooltip The tooltip of the control the mouse is currently over, or which has keyboard focus. (Read Only).

Static Functions

BeginGroup Begin a group. Must be matched with a call to EndGroup.
BeginScrollView Begin a scrolling view inside your GUI.
Box Make a graphical box.
BringWindowToBack Bring a specific window to back of the floating windows.
BringWindowToFront Bring a specific window to front of the floating windows.
Button Make a single press button. The user clicks them and something happens immediately.
DragWindow Make a window draggable.
DrawTexture Draw a texture within a rectangle.
DrawTextureWithTexCoords Draw a texture within a rectangle with the given texture coordinates. Use this function for clipping or tiling the image within the given rectangle.
EndGroup End a group.
EndScrollView Ends a scrollview started with a call to BeginScrollView.
FocusControl Move keyboard focus to a named control.
FocusWindow Make a window become the active window.
GetNameOfFocusedControl Get the name of named control that has focus.
HorizontalScrollbar Make a horizontal scrollbar. Scrollbars are what you use to scroll through a document. Most likely, you want to use scrollViews instead.
HorizontalSlider A horizontal slider the user can drag to change a value between a min and a max.
Label Make a text or texture label on screen.
ModalWindow Show a Modal Window.
PasswordField Make a text field where the user can enter a password.
RepeatButton Make a button that is active as long as the user holds it down.
ScrollTo Scrolls all enclosing scrollviews so they try to make position visible.
SelectionGrid Make a grid of buttons.
SetNextControlName Set the name of the next control.
TextArea Make a Multi-line text area where the user can edit a string.
TextField Make a single-line text field where the user can edit a string.
Toggle Make an on/off toggle button.
Toolbar Make a toolbar.
UnfocusWindow Remove focus from all windows.
VerticalScrollbar Make a vertical scrollbar. Scrollbars are what you use to scroll through a document. Most likely, you want to use scrollViews instead.
VerticalSlider A vertical slider the user can drag to change a value between a min and a max.
Window Make a popup window.

Delegates

WindowFunction Callback to draw GUI within a window (used with GUI.Window).

最新文章

  1. swift禁用webView对H5中数字,链接,日期,地址,电话号码做解析
  2. HDU 3709 Balanced Number
  3. Hadoop及其相关组件简介
  4. Apache,PHP,MySQL,PMA手动配置的注意事项
  5. self指向函数地址 动态调用函数的简单例子
  6. Flume的Avro Sink和Avro Source研究之一: Avro Source
  7. android 常用颜色
  8. 《转》Java 信号量 Semaphore 介绍
  9. linux下crontab的使用方法
  10. 1.1-学习Opencv与MFC混合编程之---利用画图函数,生成视频,并写入视频文件
  11. Android菜鸟的成长笔记(10)——使用Bundle在Activity之间传值
  12. selenium webdriver定位不到元素的五种原因及解决办法
  13. php include 绝对路径 dirname(__FILE__)
  14. android 使用web查看SQLite数据
  15. vue params和query传参区别
  16. Angular 4.0 安装组件
  17. springboot取得resources下的文件
  18. php7 改为从栈上分配内在的思路
  19. weblogic连接池问题总结(转载)
  20. Android UI框架基本概念

热门文章

  1. git Eclipse项目不显示当前分支
  2. PHP开发心得二
  3. HDU_1556_线段树区间更新
  4. 扩增子统计绘图1箱线图:Alpha多样性
  5. 微信浏览器播放音频的问题:preload属性
  6. 03Oracle Database 物理结构,逻辑结构
  7. tf idf公式及sklearn中TfidfVectorizer
  8. C: 字符数组中的空去掉
  9. linux time-统计给定命令所花费的总时间
  10. linux free命令-显示内存的使用情况