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

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

51. laya.events.Event_API3.0 [ 71%]

...件侦听器。 Hierarchy Event Index Constructors constructor Properties button currentTarget delta isDblClick nativeEvent target touchId touchPos type ADDED BLUR CHANGE CHANGED CLICK CLOSE COLLISION_ENTER COLLISION_EXIT COLLISION_STAY COMPLETE DEVICE_LOST DISPLAY DOUBLE_CLICK DRAG_END DRAG_MOVE DR...

来源: Laya3.0_api 发布时间: 20231115

52. 怎么给List下的每个item中的button添加事件? [ 70%]

怎么给List下的每个item中的button添加事件? 如图,我在UI页面做了个List:     现在我每个button都单独写了一个添加事件,很繁琐,尤其是item多的时候特别麻烦,我自己都觉得这个方法特别蠢,请问有没有好一点的方法呀? 下...

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

53. 如何阻止 点击 继续传递 [ 70%]

如何阻止 点击 继续传递 list的item 上有一个buttonbutton首先处理click事件,然后 list处理该事件 如何阻止事件继续传递,而只让button处理,尝试过如下方法,但无效 附件 : --> 2017-02-24 添加评论 免费帖 --> 分享 微博 QZONE 微信 没...

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

54. list ,增加item ,我想在末尾增加,但是每次都给我翻倍的增加,如何解决 [ 70%]

...ll/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); this.roombg.addChild(button); button.on(Event.MOUSE_DOWN, this, function (e) { list.addItem(1); }); function Item(...

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

55. 分享:Panel下动态修改子容器宽高并刷新显示! [ 69%]

...age { import laya.display.Sprite; import laya.events.Event; import laya.ui.Button; import laya.ui.Panel; import laya.utils.Browser; import laya.utils.Handler; public class LayaUISample { public function LayaUISample() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.heigh...

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

56. 刚刚接触2天layaair,有几个问题请教。 [ 68%]

...教程 进入编辑模式 右键Scenes 新建了一个view拖入了一个button,起名btn1,但不知道怎么调用,强行在Main.js里面写入 btn1.on(Event.CLICK, this, onBtnClick); function onBtnClick() { alert('222'); } btn1 is not defined 按教程写脚本,实在找不到地方写,...

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

57. 点击list的时候触发的e.target永远是被点击的item? [ 68%]

...nerated method stub var cell:Box=my_list.getCell(index) as Box; var my_btn:Button=cell.getChildByName("my_btn") as Button; var my_clip:Clip=cell.getChildByName("my_clip") as Clip; my_btn.on(Event.CLICK,this,onBtnClick,["my_btn"]); my_clip.on(Event.CLICK,this,onClipClick,["my_clip"]); } private funct...

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

58. 事件管理 · LayaAir3.3 · 引擎文档 · LAYABOX [ 67%]

...送者发送事件给它的侦听者。那么比如上面示例代码中的Button就是继承自Laya.EventDispatcher,可以用.on的方法来侦听CLICK`事件。 Laya.EventDispatcher 具有如下功能: 2.2.1 事件派发 event /** * 派发事件。 * @param type 事件类型。 * @param data ...

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

59. [LayaAir3]插件开发中,我需要选择文件夹,如何可视化选择文件夹 [ 67%]

...operties: ["openDirectory"], }, type: "string", }, { name: "", inspector: "Buttons", options: { buttons: [{ caption: "生成", event: "click_start_gen" }] } } ] } ]); Editor.extensionManager.createSettings("SplitAtlasSetting", "project"); } } 2025-07-23 0 0 分享 微博 QZONE 微信 LayaAir小牛 ...

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

60. LayaBox HelloWorld实战 [ 67%]

...编辑模式,在Basics目录下找到UI目录,在UI目录里面找到Button并拖拽到场景中,修改它的通用属性var为btnShow,常用属性label为helloworld   经过这两步我们的游戏场景就大功告成了。 第三步:我们把窗口切换到IDE的代码模式,在src...

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