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

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

1. UI-List [ 100%]

...i/listskins/5.jpg"); } list.array = data; } private updateItem(cell: Item, index: number): void { cell.setImg(cell.dataSource); } private onSelect(index: number): void { console.log("当前选择的索引:" + index); } } import Box = Laya.Box; import Image = Laya.Image; class Item extends Box { pu...

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

2. UI-RadioGroup [ 97%]

...i) { var rg: RadioGroup = this.createRadioGroup(this.skins[i]); rg.selectedIndex = i; rg.x = i * this.SPACING + this.X_OFFSET; rg.y = this.Y_OFFSET; } } private createRadioGroup(skin: string): RadioGroup { var rg: RadioGroup = new RadioGroup(); rg.skin = skin; rg.space = 70; rg.direction = "v"; rg.l...

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

3. IDE-显示IDE创建的界面 [ 83%]

...ck); function onBtnClick() { //手动控制组件属性 this.radio.selectedIndex = 1; this.clip.index = 8; this.tab.selectedIndex = 2; this.combobox.selectedIndex = 0; this.check.selected = true; } function onBtn2Click() { //通过赋值可以简单快速修改组件属性 //赋值有两种方式:...

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

4. UI-Tab [ 71%]

... 1,Tab Control 2,Tab Control 3"; tab.labelPadding = "0,0,0,0"; tab.selectedIndex = 1; this.onSelect(tab.selectedIndex); tab.selectHandler = new Handler(this, this.onSelect); Laya.stage.addChild(tab); return tab; } onSelect(index) { console.log("当前选择的标签页索引为 " + index); } } new U...

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

5. 屏幕适配-屏幕适配 [ 70%]

..., "exactfit", "showall", "noborder", "full", "fixedwidth", "fixedheight"], index = 0, txt; class SmartScale_T { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Image = Laya.Image, Text = Laya.Text; // 不支持WebGL时...

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

6. UI-Clip [ 66%]

...nds() { const Clip = Laya.Clip; let clip = new Clip(clipSkin, 10, 1); clip.index = clip.clipX - 1; clip.pos(this.counter.x + 60, this.counter.y); Laya.stage.addChild(clip); } createController() { const Button = Laya.Button; this.controller = new Button(buttonSkin, "暂停"); this.controller.labelBol...

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