游戏 scrollView

using UnityEngine;
using System.Collections;

public class LLL : MonoBehaviour {

    Vector2 scrollPosition;

    // Use this for initialization
    void Start () {
        scrollPosition [0] = 50;
        scrollPosition [1] = 50;
    }
    
    // Update is called once per frame
    void Update () {
    
    }

    void OnGUI()
    {
        scrollPosition = GUI.BeginScrollView (new Rect (0, 0, 200, 200), scrollPosition, new Rect (0, 0, Screen.width, 300), true, true);

        GUI.Label (new Rect (100, 40, Screen.width, 30), "测试滚动试图,测试滚动试图,测试滚动试图,测试滚动试图。");

        GUI.EndScrollView ();
    }
}

 

posted @ 2014-02-04 17:20  yufenghou  阅读(188)  评论(0编辑  收藏  举报