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

大约有 22 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0035 秒)

1. Button文本位置错误 [ 100%]

Button文本位置错误 先设置anchor属性, 再设置skin属性, 最后设置label属性, 文本位置会在左上. let btn = new Button(); btn.anchorX = btn.anchorY = 0.5; btn.skin = 'https://layaair2.ldc2.layabox.com/demo2/h5/res/ui/button-1.png'; btn.labelSize = 22; btn.label = 'aaaa'; La...

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

2. Laya中Button等组件lose skin的问题 [ 96%]

Laya中Button等组件lose skin的问题 在UI界面给组件设置皮肤时遇到的问题,Button组件丢失了皮肤”lose skin wxlocal/enemy.png”无法正常显示,但是旁边的Image组件却能正常的展示。 设计模式中的两架飞机,上面那架是Image组件,下面那...

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

3. 怎么获取手机相册内容 [ 90%]

...a_Aaron 赞同来自: package { import laya.display.Sprite; import laya.ui.Button; import laya.utils.Browser; import laya.utils.Handler; public class Main { public function Main() { //初始化引擎 Laya.init(500,500);//初始化引擎 var skins:Array = [ "res/button-1.png" ]; Laya.loader.load(skin...

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

4. dialog的lock属性没出现 [ 87%]

...下我下面的例子 package { import laya.display.Stage; import laya.ui.Button; import laya.ui.Dialog; import laya.ui.Image; import laya.utils.Handler; import laya.webgl.WebGL; public class DialogCenterClose { private const DIALOG_WIDTH:int = 220; private const DIALOG_HEIGHT:int = 275; private con...

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

5. 3D射线穿透UI问题 [ 86%]

...用射线打到场景上面,我给UI设置了名字,加到舞台 Laya.Button button = Laya.stage.addChild(new Laya.Button("res/layabox.png", "切换动作")) as Laya.Button; button.name = "abc"; Laya.Button.on(Laya.Event.CLICK, this, function:void{ 具体实现  });     在另一个方法里...

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

6. 请问如何监听html的button元件ontouchstart,ontouchend等事件 [ 85%]

请问如何监听html的button元件ontouchstart,ontouchend等事件 如题,我可以如下为button加上onclick的监听事件。this.btn_CloseWebiFrame = laya.utils.Browser.window.document.createElement('button'); this.btn_CloseWebiFrame.onclick = () => { console.log("onclick"); };  oncon...

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

7. 1.70beta Dialog增加动画后第二次执行popup不显示弹窗 [ 84%]

... 微信 a694284699 赞同来自: (function() { var Stage = Laya.Stage; var Button = Laya.Button; var Dialog = Laya.Dialog; var Image = Laya.Image; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var DIALOG_WIDTH = 220; var DIALOG_HEIGHT = 275; var CLOSE_BTN_WIDTH = 43; var CLOSE_BTN_PADDING = 5;...

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

8. 按钮加载皮肤丢失 [ 83%]

...少,直接上代码 先预加载 skinsSecond.push( { url:"allResources/qfbutton.png", type:Loader.IMAGE }); 然后就是一些和服务器交互的操作了,在接到某一条数据,需要用到资源的时候的代码; for (var i:Number = 0; i < allArea.length;i++) {            ...

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

9. 请问,如何获得StandardMaterial,为什么transformUV始终是null [ 80%]

...der.material.diffuseTexture = Laya.Texture2D.load("../../res/threeDimen/ui/button.png"); layaMonkey.meshRender.material.transformUV = new Laya.TransformUV(); console.log(layaMonkey.meshRender.material.transformUV); var rotation = new Laya.Vector3(0, 0.01, 0); var debugModel = false; var phasorSprite...

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

10. 无法触发浏览器文件上传框 [ 78%]

...览器文件上传框 // 程序入口 class GameMain { private btn: Laya.Button; private skin: string = 'images/button.png'; constructor() { Laya.init(200, 300); Laya.loader.load(this.skin, Laya.Handler.create(this, () => { this.btn = this.createBtn(this.skin); this.btn.on(Laya.Event.CLICK, this,...

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