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

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

1. UI-Tree [ 100%]

...("res/ui/tree/clip_selectBox.png", 1, 2); selectBox.name = "selectBox"; // 设置 selectBox 的name 为“selectBox”时,将被识别为树结构的项的背景。2帧:悬停时背景、选中时背景。 selectBox.height = 32; selectBox.x = 13; selectBox.left = 12; this.addChild(selectBox); le...

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

2. 屏幕适配-屏幕适配 [ 91%]

...t; // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); //设置适配模式 Laya.stage.scaleMode = "noscale"; //设置横竖屏 Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; //设置水平对齐 Laya.stage.alignH = "center"; //设置垂直对齐 Laya.stage.alignV = "middle"; //...

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

3. 文本-下划线 [ 83%]

...(300, 50); txt.fontSize = 20; txt.color = "#ffffff"; txt.align = align; // 设置下划线 txt.underline = true; txt.underlineColor = underlineColor; txt.pos(x, y); return txt; } } new Text_Underline();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import WebGL = Laya.WebGL; expor...

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

4. 鼠标交互-修正交互区域 [ 78%]

...CoralRect(); this.createDeepSkyblueRect(); this.createDarkOrchidRect(); // 设置舞台 Laya.stage.name = "暗灰色舞台" Laya.stage.on(Event.MOUSE_DOWN, this, this.onDown); } createCoralRect() { const Sprite = Laya.Sprite, Event = Laya.Event; let coralRect = new Sprite(); coralRect.graphics.drawR...

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

5. UI-RefreshList [ 52%]

...moveLimit, distance= 0, time= 2000){ if (eventName === "dragTopLimit") { //设置下拉的最大橡皮筋高度,只有在启用了停止滚动的功能后有效 this.refreshList.scrollBar.topMoveLimit = moveLimit; } else if (eventName === "dragBottomLimit") { this.refreshList.scrollBar.bottomMoveLim...

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