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

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

11. 改变位置后,点击区域不生效了 [ 67%]

...function MoveTest() { Laya.init(600,600); var sp:Sprite = new Sprite(); sp.autoSize=true; sp.graphics.drawRect(0,0,100,100,"#ff0000"); sp.on(Event.CLICK,this,onClick); Laya.stage.addChild(sp); } private function onClick(event:Event):void{ Render._mainCanvas.source.style.left = "100px"; Render._mainC...

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

12. sprite添加texture后,sprite无法触发点击事件? [ 66%]

... 微信 yplpf 赞同来自: Sprite默认是没有宽高的, 设置一下 autoSize=true 就能触发鼠标事件了 2017-08-27 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 heyaaron 相关问题 Dialog:屏蔽点击Dialog之外的区...

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

13. 关于矢量图跟Image [ 65%]

...以通过getBounds函数获取;也可手动设置宽高;还可以设置autoSize=true,然后再获取宽高。Sprite的宽高一般用于进行碰撞检测和排版,并不影响显示图像大小,如果需要更改显示图像大小,请使用 scaleX , scaleY , scale。 Sprite ...

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

14. UI-RefreshList [ 63%]

...xt.fontSize = 35; tiptext.color = "#e5e5e5"; tiptext.pos(172, 20); tiptext.autoSize = true; var texArea = new TextArea(); image.addChild(texArea); texArea.hScrollBarSkin = ""; texArea.wordWrap = true; texArea.multiline = true; texArea.editable = true; texArea.text = "顶与底的列表尽头可拉...

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

15. HBox宽度计算问题 [ 63%]

...ox = new HBox(); hbox.align = Stage.ALIGN_MIDDLE; hbox.space = 50; // hbox.autoSize = true; var label:Label = new Label(); label.text = "https://ldc2.layabox.com/layadownload/"; label.fontSize = 30; label.mouseEnabled = false; hbox.addChild(label);   var label1:Label = new Label(); label1.text = "...

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

16. Spine骨骼动画点击区域偏移 获取不到width height [ 63%]

...     sprite.y = y;         sprite.scale(0.5,0.5);         sprite.autoSize = true;         sprite.play("idle", true);         Laya.stage.addChild(sprite);         console.log(sprite.getBounds());           console.log(sprite.width,sprite.height));      } 附件 : --> ZG....

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

17. Sprite中的width,height和size(width,height)感觉没作用啊 [ 61%]

...   sprite.graphics.drawTexture(texture,0,0,50,50);         sprite.autoSize = true; })); Laya.stage.addChild(sprite); 或者用Image: var image:laya.ui.Image = new laya.ui.Image("comp/bg.png"); image.size(50,50); Laya.stage.addChild(image); 2016-07-11 1 0 分享 微博 QZONE 微信 cuixueyi...

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

18. sprite做的按钮点击无反应? [ 56%]

...性能,慎用 lei159130 • 2017-08-24 11:12 @ohkei:可以设置Sprite的autoSize属性为true来自动获取,也可以使用getBounds获取父容器的矩形框。

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

19. 下拉选项框组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 52%]

...lSize = 30; ComboBox.itemSize = 25 this.owner.addChild(ComboBox); ComboBox.autoSize = true; ComboBox.pos(200, 200); }); } } Copyright ©Layabox 2026 all right reserved,powered by LayaAir Engine更新时间: 2025-10-10 16:27:59 img{cursor:pointer}

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

20. laya.ui.View [ 48%]

...点,值为0-1Component anchorY : NumberY轴锚点,值为0-1Component autoSize : Boolean = false 指定是否自动计算宽高数据。默认值为 false 。 Sprite宽高默认为0,并且不会随着绘制内容的变化而变化,如果想根据绘制内容获取宽高,可以设置本属...

来源: laya_api 发布时间: 20170929