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

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

281. 文字在框内滑动、滚动文本 [ 80%]

...00);     //这里没看出来是什么意思     this.txt.x=Laya.stage.width-this.txt.width>>1;     this.txt.y=Laya.stage.height-this.txt.height>>1;     this.txt.borderColor="#ffff00";     this.txt.fontSize=20;     this.txt.color="#ffffff";     Laya.stage.addChild(this.txt)...

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

282. 文本-单行输入 [ 80%]

...ya.Stat; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createInput(); } createInpu...

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

283. 请问怎么制作一个layabox js版本的加载效果 [ 80%]

...lete() { progressBar = new ProgressBar("./comp/progress.png"); progressBar.width = 400; progressBar.x = (Laya.stage.width - progressBar.width) / 2; progressBar.y = Laya.stage.height / 2; progressBar.value = 0; progressBar.sizeGrid = "5,5,5,5"; // progressBar.changeHandler = new Handler(this, null); ...

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

284. [LayaAir 2.0] 如何用代码为Spirte添加2d物理特性 [ 80%]

...= this._boll1.addComponent(laya.physics.BoxCollider); box.height = 60; box.width = 28; //添加刚体 this._boll1.addComponent(Laya.RigidBody); //创建挡板 this.createPanel(); } private createPanel():void { let panel:Laya.Sprite = new Laya.Sprite(); panel.graphics.drawRect(0,100,100,20,0xffffff);...

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

285. UI-ScrollBar [ 80%]

...er() { var hs = new HScrollBar(); hs.skin = "../../res/ui/hscroll.png"; hs.width = 300; hs.pos(50, 170); hs.min = 0; hs.max = 100; hs.changeHandler = new Handler(this, onChange); Laya.stage.addChild(hs); } function placeVScroller() { var vs = new VScrollBar(); vs.skin = "../../res/ui/vscroll.png"; v...

来源: Laya_示例 发布时间: 20260303

286. 动画-SWF动画 [ 80%]

...r; var WebGL = Laya.WebGL; var SWFPath = "../../res/swf/dragon.swf"; var MCWidth = 318; var MCHeight = 406; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CEN...

来源: Laya_示例 发布时间: 20260303

287. 在 tiledmap 插入一个精灵在上面 [ 80%]

...this.tiledMap.createMap("desert.json", new Laya.Rectangle(0, 0, Laya.stage.width, Laya.stage.height),   Laya.Handler.create(this,this.loadedMap)); }   loadedMap(){   this.sp=new Laya.Sprite();   this.sp.graphics.drawRect(0,0,100,100,"#FF0000");   var mapLayer = this.tiledMap.getLayerByIndex(1);...

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

288. Panel控件滑动区域不正常的问题 [ 80%]

...nt; var rect = new Laya.Sprite(); rect.graphics.drawRect(0, 0, this.contentWidth, this.contentHeight, "#000000"); content.hitArea = new Laya.HitArea(); content.hitArea.hit = rect.graphics; } 然后分别在panel的“setContentSize”和“changeScroll”方法的最后一行添加  this.setContent...

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

289. 文本-多行输入 [ 79%]

...ya.Stat; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createInput(); } createInpu...

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

290. 文本-自动调整文本尺寸 [ 79%]

...ow = Text.VISIBLE; autoSizeText.y = 50; // 该文本被限制了宽度 var widthLimitText = this.createSampleText(); widthLimitText.width = 100; widthLimitText.y = 180; //该文本被限制了高度 var heightLimitText = this.createSampleText(); heightLimitText.height = 20; heightLimitText.y = 320; ...

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