大约有 195 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0066 秒)
Laya3.0_api(61) Laya2.0_api(57) laya_api(53) Laya_社区(15) Laya3.0_文档(3) Laya2.0_文档(3) Laya2.0_示例(2) Laya_示例(1)
...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
... 微信 yplpf 赞同来自: Sprite默认是没有宽高的, 设置一下 autoSize=true 就能触发鼠标事件了 2017-08-27 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 heyaaron 相关问题 Dialog:屏蔽点击Dialog之外的区...
来源: Laya_社区 发布时间: 20170826
...以通过getBounds函数获取;也可手动设置宽高;还可以设置autoSize=true,然后再获取宽高。Sprite的宽高一般用于进行碰撞检测和排版,并不影响显示图像大小,如果需要更改显示图像大小,请使用 scaleX , scaleY , scale。 Sprite ...
来源: Laya_社区 发布时间: 20180205
...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
...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
... 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
... 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
...性能,慎用 lei159130 • 2017-08-24 11:12 @ohkei:可以设置Sprite的autoSize属性为true来自动获取,也可以使用getBounds获取父容器的矩形框。
来源: Laya_社区 发布时间: 20170120
...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
...点,值为0-1Component anchorY : NumberY轴锚点,值为0-1Component autoSize : Boolean = false 指定是否自动计算宽高数据。默认值为 false 。 Sprite宽高默认为0,并且不会随着绘制内容的变化而变化,如果想根据绘制内容获取宽高,可以设置本属...
来源: laya_api 发布时间: 20170929