进度条-创新互联

EditorGUI.ProgressBar 进度条

static function ProgressBar (position : Rect, value : float, text : string) : void

创新互联建站长期为成百上千客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为高台企业提供专业的成都做网站、网站建设、外贸营销网站建设高台网站改版等技术服务。拥有10年丰富建站经验和众多成功案例,为您定制开发。

Parameters参数

  • totalPosition Rectangle on the screen to use in total for both the control.
    屏幕上的矩形区域,用来总的这两者控制
  • value Value that is shown. //显示的值

Description描述

Make a progress bar.

制作一个进度条。

Value goes from 0 to 1, where 0 means 0% of the bar filled and 1 means the bar is at 100% fully filled

从0到1;0表示0%,1表示100%满条。

Progress bar in an Editor Window.
编辑器中的进度条。

// Draw the damage and the armor with bars in an Editor Window
//在编辑器绘制伤害和盔甲的状态        
class EditorGUIProgressBar extends EditorWindow {

var armor : int = 20;
var damage : int = 80;

    @MenuItem("Examples/Display Info")
    staticfunction Init() {
var window = GetWindow(EditorGUIProgressBar);
        window.Show();
    }

function OnGUI() {
        armor= EditorGUI.IntSlider(Rect(3,3,position.width-6,15), "Armor:", armor, 0, 100);
        damage= EditorGUI.IntSlider(Rect(3,25,position.width-6,15), "Damage:", damage, 0, 100);

        EditorGUI.ProgressBar(Rect(3,45,position.width-6,20),armor/100.0, "Armor");
        EditorGUI.ProgressBar(Rect(3,70,position.width-6,20),damage/100.0, "Damage");

    }
}

分享文章:进度条-创新互联
网页URL:http://myzitong.com/article/dcocoj.html