大约有 987 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0068 秒)
list item 添加事件后无法监听 刚接触laya不久,按官方文档写了list的demo,但是发现item的点击/ select一直没回调,这是我的代码,求大神解答 // 初始化ListView function createListView(x, y, width, height, item_width, item_height) { var list ...
来源: Laya_社区 发布时间: 20180724
...data; this.list = list; Laya.stage.addChild(list); this.hitArea = new Laya.HitArea(); this.hitArea.hit.drawRect(list.x, list.y -100,list.width, list.height, "#000000"); //限制鼠标点击区...
来源: Laya_社区 发布时间: 20210122
...倍的增加,如何解决 _proto.room_xinxi=function(){ this.roombg=new Laya.Image($mj.Curr_Game_ImagePath + "hall/room_bg.png"); this.roombg.pos(50,150); this.addChild(this.roombg); var button = new Sprite(); button.loadImage($mj.Curr_Game_ImagePath + "hall/room_jiesan.png"); button.pos(300, 0); ...
来源: Laya_社区 发布时间: 20170920
...下可以放置view,写了个例子,可以参考下:package { import laya.net.Loader; import laya.ui.List; import laya.ui.View; import laya.utils.Browser; import laya.utils.Handler; public class LayaAirDemo { private var list:List; public function LayaAirDemo() { Laya.init(Browser.width,Browse...
来源: Laya_社区 发布时间: 20170626
...anceSellDlg\\xiaodou.png",hot:1,orderCount:9} // 背景 var bg_image = new Laya.Image(); bg_image.skin = "res/popupwnd/market_item_bg.png"; bg_image.pos(0, 0); bg_image.size(312, 462); this.addChild(bg_image); // 金豆数 this._goldLabel = new Laya.Label(); this._goldLabel.color = "#FFBA00"; var fo...
来源: Laya_社区 发布时间: 20170422
...需要在setupDemo之前执行。 (function() { // 项渲染器 var Box = Laya.Box; var Image = Laya.Image; var Label = Laya.Label; var TextInput = laya.ui.TextInput; var WID = 373, HEI = 30; function Item() { Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.i...
来源: Laya_社区 发布时间: 20180312
...码如下:private function showFoods():void{ foodSprite = new Sprite(); Laya.stage.addChild(foodSprite); //初始化当前菜品下标 this.index = 0; //数据数组 foodArray = ; foodArray.push(new Food("菜品1", "1", 0)); foodArray.push(new Food("菜品2", "2", 1)); foodArray.push(new Food("菜...
来源: Laya_社区 发布时间: 20180407
...法渲染出来 //添加方向光 var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.color = new Laya.Vector3(0.6, 0.6, 0.6); directionLight.direction = new Laya.Vector3(1, -1, 0); directionLight.shadow = true; directionLight.shadowDistance = 3; directionLight.shadowResol...
来源: Laya_社区 发布时间: 20170809
... posY = posY + 200; } let list = new Laya.List; list.width = this.itemList.width; list.height = this.itemList.height; list.x = this.itemList.x; list.y = this.itemList.y; list.spaceY = 12;...
来源: Laya_社区 发布时间: 20170310
...nds(); ani.scale(80/bounds.width ,80/bounds.height) this.addChild(ani) } } Laya.class(Item1, "Item1", Box); var List = Laya.List; function setup(effList) { var list = new List(); list.itemRender = Item1; list.repeatX = 3; list.repeatY = 4; list.x = (Laya.stage.width - WID * list.repeatY) / 2 - 100; ...
来源: Laya_社区 发布时间: 20170627