Egret eui 学习-VSlider---
作者:
彬少灬 | 来源:发表于
2018-02-11 14:29 被阅读139次
滑动选择器
滑块效果图
//2.11滑动选择器
//水平滑块
private initHslider():void{
var hslider: eui.HSlider = new eui.HSlider();
hslider.width = 200;
hslider.x = 100;
hslider.y = 100;
hslider.maximum = 100;
hslider.minimum = 0;
hslider.value = 0;
hslider.addEventListener(eui.UIEvent.CHANGE,(evt:eui.UIEvent)=>{egret.log(evt.target.value)},this);
this.addChild(hslider);
}
//垂直滑块
private initVslider():void{
var vslider: eui.VSlider = new eui.VSlider();
vslider.height = 100;
vslider.x = 200;
vslider.y = 200;
vslider.maximum = 100;
vslider.minimum = 0;
vslider.value = 0;
vslider.addEventListener(eui.UIEvent.CHANGE,(evt:eui.UIEvent)=>{egret.log(evt.target.value)},this);
this.addChild(vslider);
}
本文标题:Egret eui 学习-VSlider---
本文链接:https://www.haomeiwen.com/subject/yjwktftx.html
网友评论