• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 432 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0056 秒)

271. 在微信小游戏中使用list,兼听不到mouseHandler跟selectHandler。 [ 61%]

...mage = Laya.Image;   var WID = 373, HEI = 85;   function Item() { Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.img);   this.setImg = function(src) { this.img.skin = src; } } Laya.class(Item, "Item", Box);   // 主要逻辑代码 var Stage   = Laya.St...

来源: Laya_社区 发布时间: 20180731

272. 请问用laya的tab模板创建的tab,为啥没有点击事件啊?而且tab标签点击后没有一直处于按下状态 [ 61%]

...Class();     Laya.stage.addChild(UI); } function MyBoot() {     MyBoot.super(this);          this.Boot.selectHandler = new Laya.Handler(this, onSelect, null, false);//设置 tab 的选择项发生改变时执行的处理器。     console.log("A123");     function onSelect(index)    ...

来源: Laya_社区 发布时间: 20160722

273. 程序蓝图 · LayaAir3.4 · 引擎文档 · LAYABOX [ 61%]

...lass TestBluePrint extends Laya.Script { constructor(testParams: string) { super(); } } (图12-1) 3.2 属性 在变量前使用装饰器的标识@bpProperty,在get和set前使用装饰器的标识@bpAccessor,示例代码如下所示: const { bpClass, bpAccessor, bpProperty } = BP; @bpClass...

来源: Laya3.0_文档 发布时间: 20251010

274. UI-Tree [ 61%]

...: {"name": "render", "right": "0", "left": "0"}}; function Item() { Item.__super.call(this); this.right = 0; this.left = 0; var selectBox = new Clip("../../res/ui/tree/clip_selectBox.png", 1, 2); selectBox.name = "selectBox"; //设置 selectBox 的name 为“selectBox”时,将被识别为树结...

来源: Laya_示例 发布时间: 20260930

275. UI-Tree [ 61%]

...er", "right": "0", "left": "0"}}; class Item extends Box { constructor() { super(); this.right = 0; this.left = 0; let selectBox = new Clip("res/ui/tree/clip_selectBox.png", 1, 2); selectBox.name = "selectBox"; // 设置 selectBox 的name 为“selectBox”时,将被识别为树结构的项的背...

来源: Laya2.0_示例 发布时间: 20260930

276. 弹窗视图组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 61%]

...r = 5; private assets: any[]; private dialog: Laya.Dialog; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { // 图片资源来自“引擎API使用示例” this.assets = ["resources/res/ui/dialog (1)....

来源: Laya3.0_文档 发布时间: 20251024

277. HTMLIframeElement加载html网页的问题 [ 61%]

...= Laya.HTMLIframeElement; class TestUI extends ui.htmlUI { constructor() { super(); var iHtml: HTMLIframeElement = new HTMLIframeElement(); Laya.stage.addChild(iHtml); iHtml.href = "https://www.baidu.com/"; } } // 程序入口 Laya.init(600, 400); Laya.loader.load([{ url: "res/atlas/comp.json", type...

来源: Laya_社区 发布时间: 20171011

278. 单选框组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 61%]

...a; @regClass() export class UI_Radio extends Laya.Script { constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { let radio: Laya.Radio = new Laya.Radio(); radio.pos(200, 200); radio.size(160, 64); radio.sta...

来源: Laya3.0_文档 发布时间: 20251010

279. list item 添加事件后无法监听 [ 61%]

...mage = Laya.Image;   var WID = 373, HEI = 85;   function Item() { Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.img);   this.setImg = function(src) { this.img.skin = src; } } Laya.class(Item, "Item", Box);   // 主要逻辑代码 var Stage   = Laya.St...

来源: Laya_社区 发布时间: 20180724

280. 限制区域拖动效果,为什么会无法限制呢? [ 60%]

...aya.WebGL; var Handler = Laya.Handler  function GolfMainUI() { GolfMainUI.super(this)  var dragRegion; showDragRegion(); this.golfBall.x = Laya.stage.width / 2; this.golfBall.y = Laya.stage.height / 2; this.golfBall.on(Event.MOUSE_DOWN, this, onStartDrag)  function showDragRegion() { //拖动限...

来源: Laya_社区 发布时间: 20180627