大约有 1,409 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0047 秒)
...er; class TestUI extends ui.test.TestPageUI { constructor() { super(); var btn1=new ui.test.view_btnUI(); var btn1_btn:laya.ui.Button=btn1.getChildByName("btn") as laya.ui.Button; //问题一: 这里为什么获取不到子node呢?打印显示btn1_btn为null console.log(btn1_btn); // btn1_btn.la...
来源: Laya_社区 发布时间: 20170725
...设置skin属性, 最后设置label属性, 文本位置会在左上. let btn = new Button(); btn.anchorX = btn.anchorY = 0.5; btn.skin = 'https://layaair2.ldc2.layabox.com/demo2/h5/res/ui/button-1.png'; btn.labelSize = 22; btn.label = 'aaaa'; Laya.stage.addChild(btn); let btn = new Button(); btn.s...
来源: Laya_社区 发布时间: 20190907
...te(); Laya.stage.addChild(dialog_mc); var w:int = 110; var h:int = 40; var btn:Sprite = new Sprite(); btn.size(w, h); btn.graphics.drawRect((stageWd - w) * 0.5, (stageHt - h) * 0.5-50, w, h, "#FF7F50"); btn.graphics.fillText("确 定", (stageWd) * 0.5 , (stageHt - h) * 0.5-43, "25px SimHei", "#FFFFF...
来源: Laya_社区 发布时间: 20170120
滤镜问题,有复现demo /** 问题描述:鼠标按下 btn 时设置btn的滤镜,然后放开时将btn.fitlers = null,这时舞台绘画的消失了???? */ Laya.stage.graphics.drawRect(200, 200, Laya.stage.width / 2, Laya.stage.height / 2, "#ffff00"); var btn:Sprite = new Sprite(); ...
来源: Laya_社区 发布时间: 20181221
...iFly.pos(250, 100); Laya.stage.addChild(this.aniFly); // 创建按钮 this.btn = new Sprite().size(205, 55); this.btn.graphics.drawRect(0, 0, this.btn.width, this.btn.height, "#057AFB"); this.txt = new Text(); this.txt.text = "销毁"; this.txt.pos(75, 15); this.txt.fontSize = 25; this.txt.color = "...
来源: Laya2.0_示例 发布时间: 20241117
...ass LayaUISample { private var btn1:Button; private var btn2:Button; private var taskView:TaskUI; public function LayaUISample() { //初始化引擎...
来源: Laya_社区 发布时间: 20180425
...const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; this.btnArr = ["res/threeDimen/ui/button.png", "res/threeDimen/ui/button.png", "res/threeDimen/ui/button.png"]; this.nameArr = ["canvas截图","sprite截图","清理"]; this._canvas = null; this.aimSp = null; this.drawImage = null...
来源: Laya2.0_示例 发布时间: 20241117
...niFly.pos(250, 100); Laya.stage.addChild(this.aniFly); //创建按钮 this.btn = new Sprite().size(205, 55); this.btn.graphics.drawRect(0, 0, this.btn.width, this.btn.height, "#057AFB"); this.txt = new Text(); this.txt.text = "销毁"; this.txt.pos(75, 15); this.txt.fontSize = 25; this.txt.color = "...
来源: Laya_示例 发布时间: 20241117
...自: 189*****192 为你的每个button设置name属性,譬如btn001,btn001,利用for循环的i值去给name赋值,在鼠标点击事件触发的时候,获取e.target.name即可 或者 在for循环的过程中为你的btn添加鼠标事件,通过传参的...
来源: Laya_社区 发布时间: 20170425
...08 setVal(src:string,val:string,index:number,uiCtrl:MainUICtrl):void{ this.btn.stateNum=1; this.btn.labelAlign="center"; this.btn.labelVAlign="bottom"; this.btn.labelPadding="0,0,1,0"; this.btn.label=val; if(this.lbl==null){ this.lbl=new Laya.Label(val); this.lbl.name=&...
来源: Laya_社区 发布时间: 20241014