首页 > 其他 > 详细

游戏 slider

时间:2014-02-04 23:46:21      阅读:656      评论:0      收藏:0      [点我收藏+]
bubuko.com,布布扣
using UnityEngine;
using System.Collections;

public class La : MonoBehaviour {


    float verticalValue=0f;

    float horizontalValue=0.0f;

    // Use this for initialization
    void Start () {
    
    }
    
    // Update is called once per frame
    void Update () {
    
    }

    void OnGUI()
    {
        verticalValue = GUI.VerticalSlider (new Rect (25, 25, 30, 100), verticalValue, 100f, 0f);
        horizontalValue = GUI.HorizontalSlider (new Rect (50, 25, 100, 30), horizontalValue, 0.0f, 100.0f);

        GUI.Label(new Rect(10,150,Screen.width,30),"纵向滑动条当前进度:"+verticalValue+"%");
        GUI.Label(new Rect(10,180,Screen.width,30),"横向滑动条当前进度:"+horizontalValue+"%");
    }
}
bubuko.com,布布扣

游戏 slider

原文:http://www.cnblogs.com/yufenghou/p/3537909.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!