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

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

461. 获取的ui页面里下on事件无法触发 [ 70%]

获取的ui页面里下on事件无法触发 类代码如下: var GameStartView = function () { GameStartView.super(this); this.Start.on(Laya.Event.CLICK, this, this.open); console.log(this.Start); GameStartView.prototype.open = function(){ console.log("Open is ok"); } }; Laya.class(GameStartView,...

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

462. js进度,进度,js场景进度效果 [ 70%]

js进度,进度,js场景进度效果 new function() { var className = 'Game'; window[className] = (function(original) { function Class() { this.arr = [ "res/atlas/lucky8.json", "res/atlas/lucky8/lewinlineicons.json", "res/atlas/lucky8/setting.json", "res/atlas/lucky8/setView.json", "res/atlas/lucky...

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

463. html固定宽高,设置垂直居中没有效果。只有水平居中才生效。看了下源码,感觉在updatePos函数里的算法不对 [ 70%]

...return; this.style._type |=/*laya.display.css.CSSStyle.ADDLAYOUTED*/0x200; var tArray=Layout.layout(this); if (tArray){ if (!this._$P.mHtmlBounds)this._set$P("mHtmlBounds",new Rectangle()); var tRectangle=this._$P.mHtmlBounds; tRectangle.x=tRectangle.y=0; tRectangle.width=this.contextWidth...

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

464. 关于2.1.0代码设计的疑问 [ 70%]

...了自己要在外部创建变量,o(╥﹏╥)o /** @private */ private var _forward:Vector3 = new Vector3(); /** @private */ private var _up:Vector3 = new Vector3(); /** @private */ private var _right:Vector3 = new Vector3(); /** @private */能给解释一下,引擎组是怎么考虑的,然...

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

465. 如何监听移动端软键盘的弹出和收回? [ 70%]

...键盘执行弹出和收回状态的监听 如下列代码所示 private var textInput:TextField; textInput=new TextField(); textInput.type=TextFieldType.INPUT; textInput.border=true; textInput.multiline=true; textInput.wordWrap=true; textInput.width=200; textInput.x=100; textInput.y=200; addChild(t...

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

466. textInput的单行输入&多行输入(JavaScript-LayaAir基础篇(JS)-文本) [ 70%]

...InputSingleline(); Text_InputMultiline(); function Text_InputSingleline(){ var textInput = new Laya.TextInput("单行输入");//创建一个 TextInput 类的实例对象 textInput 。 textInput.wordWrap = true;//设置 textInput 的文本自动换行。 textInput.fontSize = 30;//设置 textInput 的...

来源: Laya2.0_文档 发布时间: 20210714

467. 如何在html js代码里,获取laya.ui.Label的值呢? [ 70%]

...l 的值 Label创建: {     type: "Label",     props: {         "var": "userscore",         valign: "middle",         text: 2e6,         padding: "0,8,0,0",         height: 20,         fontSize: 20,         color: "#eeeeee",         centerY: 0     } }, 如何...

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

468. 关于在List中数据修改后UI无法更新的问题 [ 70%]

...在List中数据修改后UI无法更新的问题 this.ScrDList.array=[]; var btnitem=ScData2[itemNum]; btnitem.item.label="11111"; ScData2[itemNum]=btnitem; btnitem.item.label="2222"; ScData2.push(btnitem); this.ScrDList.array=ScData2; //list中添加删除项都可以更新,唯独修改数据源中...

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

469. laya3D 发部为android,只要一创建场景(包括空场景)就有如下报错,并且黑屏 [ 69%]

...LIGN_CENTER; Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; //添加3D场景 var scene = new Laya.Scene(); //var scene = Laya.Scene.load('res/models/scene1.ls'); this.scene = Laya.stage.addChild(scene); if(!scene) return; var camera = this.scene.addChild(new Laya.Camera(0, 0.01, 1000)); camera.transfo...

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

470. LayaAir IDE 语言包的使用? [ 69%]

...ate(this,onLoaded),null,Loader.JSON); } private function onLoaded():void { var obj:Object=Laya.loader.getRes("lang.lang"); Text.langPacks=obj; var texts:Text=new Text(); texts.text="hello!welcom LayaBox"; Laya.stage.addChild(texts); } } }   2016-10-18 1 0 分享 微博 QZONE 微信 a13121527420 - ...

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