首页 unity3D教程之开始滚动视图

unity3D教程之开始滚动视图

举报
开通vip

unity3D教程之开始滚动视图static function BeginScrollView (scrollPosition : Vector2, params options : GUILayoutOption[]) : Vector2 static function BeginScrollView (scrollPosition : Vector2, alwaysShowHorizontal : bool, alwaysShowVertical : bool, params options : GUILayoutOption[]) : ...

unity3D教程之开始滚动视图
static function BeginScrollView (scrollPosition : Vector2, params options : GUILayoutOption[]) : Vector2 static function BeginScrollView (scrollPosition : Vector2, alwaysShowHorizontal : bool, alwaysShowVertical : bool, params options : GUILayoutOption[]) : Vector2【狗刨学习网】 static function BeginScrollView (scrollPosition : Vector2, horizontalScrollbar : GUIStyle, verticalScrollbar : GUIStyle, params options : GUILayoutOption[]) : Vector2 static function BeginScrollView (scrollPosition : Vector2, style : GUIStyle) : Vector2 static function BeginScrollView (scrollPosition : Vector2, alwaysShowHorizontal : bool, alwaysShowVertical : bool, horizontalScrollbar : GUIStyle, verticalScrollbar : GUIStyle, background : GUIStyle, params options : GUILayoutOption[]) : Vector2 Parameters参数 ?scrollPosition The position to use display. // 用来显示的位置 ?alwayShowHorizontal Optional parameter to always show the horizontal scrollbar. If false or left out, it is only shown when the content inside the ScrollView is wider than the scrollview itself. 可选参数,总是显示水平滚动条。如果为假或忽略,仅当里面的内容被滚动视图本 身大时显示。 ?alwayShowVertical Optional parameter to always show the vertical scrollbar. If false or left out, it is only shown when content inside the ScrollView is taller than the scrollview itself. 可选参数,总是显示垂直滚动条。如果为假或忽略,仅当里面的内容被滚动视图本 身大时显示。 ?horizontalScrollbar Optional GUIStyle to use for the horizontal scrollbar. If left out, the horizontalScrollbar style from the current GUISkin is used. 水平滚动条的可选样式。如果忽略,水平滚动条样式使用当前的GUISkin。 verticalScrollbar Optional GUIStyle to use for the vertical scrollbar. If left out, the verticalScrollbar style from the current GUISkin is used. 水平滚动条的可选样式。如果忽略,垂直滚动条样式使用当前的GUISkin。 Returns Vector2 - The modified scrollPosition. Feed this back into the variable you pass in, as shown in the example. 返回Vector2,由scrollPosition修改的。提供这个返回传递给变量。 Description描述 Begin an automatically layouted scrollview. 开始一个自动布局滚动视图。 These work just like GUILayout.BeginScrollview but feel more application-like and should be used in the editor 就像GUILayout.BeginScrollview,但感觉更多像应用程序并且应在编辑器中使用。 Label inside a scroll view. 滚动视图中的标签。 // Simple Editor Window that creates a scroll view with a Label inside //创建一个带有标签的滚动视图 class BeginEndScrollView extends EditorWindow { var scrollPos : Vector2; var t : String = "This is a string inside a Scroll view!"; @MenuItem("Examples/Write text on ScrollView") static function Init() { var window = GetWindow(BeginEndScrollView); window.Show(); } function OnGUI() { EditorGUILayout.BeginHorizontal(); scrollPos = EditorGUILayout.BeginScrollView(scrollPos, GUILayout.Width (100), GUILayout.Height (100)); GUILayout.Label(t); EditorGUILayout.EndScrollView(); if(GUILayout.Button("Add More Text", GUILayout.Width (100), GUILayout.Height (100))) t += " \nAnd this is more text!"; EditorGUILayout.EndHorizontal(); if(GUILayout.Button("Clear")) t = ""; } }
本文档为【unity3D教程之开始滚动视图】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_597436
暂无简介~
格式:doc
大小:18KB
软件:Word
页数:5
分类:互联网
上传时间:2019-04-18
浏览量:15