using UnityEngine;
using System.Collections;
public class TestUI : MonoBehaviour {
public Vector2 scrollPosition = Vector2.zero;
public float scrollVelocity = 0f;
public float timeTouchPhaseEnded = 0f;
public float inertiaDuration = 0.5f;
public Vector2 lastDeltaPos;
// Use this for initialization
void Start () {
}
void OnGUI()
{
scrollPosition = GUI.BeginScrollView(new Rect(100, 40, 600, 400), scrollPosition, new Rect(0, 0, 500, 1600), false, true);
for (int i = 0; i < 32; i++)
{
GUI.Button(new Rect(0, i*50, 400, 50), "Button"+i);
}
GUI.EndScrollView();
}
// Update is called once per frame
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余2页未读,立即下载
- 1
- 2
前往页