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

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

1. UI-RefreshList [ 100%]

...列表单元是否已打开 */ this.itemIsOpen=false; /**展开的单元格索引ID */ this.itemOpenId=-1; /**展开的单元格对象 */ this.openedItem = null; /** 记录模拟数据的红点状态 */ this.redHotStatus =[]; /** 纪录鼠标按下状态,true为已按下,用于状态判断 */ th...

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

2. UI-Tab [ 81%]

...tab); return tab; } onSelect(index) { console.log("当前选择的标签页索引为 " + index); } } new UI_Tab();module laya { import Stage = Laya.Stage; import Tab = Laya.Tab; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class UI_Tab { private skins: Array = ["res/ui/tab1.png",...

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

3. 动画-图集动画 [ 80%]

...; // 设置播放间隔(单位:毫秒) ani.index = 1; // 当前播放索引 ani.play(); // 播放图集动画 // 获取动画的边界信息 let bounds = ani.getGraphicBounds(); ani.pivot(bounds.width / 2, bounds.height / 2); ani.pos(Laya.stage.width / 2, Laya.stage.height / 2); } } new Animat...

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

4. UI-List [ 75%]

...ce); } private onSelect(index: number): void { console.log("当前选择的索引:" + index); } } import Box = Laya.Box; import Image = Laya.Image; class Item extends Box { public static WID: number = 373; public static HEI: number = 85; private img: Image; constructor(){ super(); this.size(Item.W...

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

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

...ll", "noborder", "full", "fixedwidth", "fixedheight"]; //当前适配模式索引 private index: number = 0; //全局文本信息 private txt: Text; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(1136, 640, WebGL); //设置适配模式 Laya.stage.scaleMode = "noscale"; //设置...

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