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

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

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); va...

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

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

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

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

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

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

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

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

...) { createCoralRect(); createDeepSkyblueRect(); createDarkOrchidRect(); // 设置舞台 Laya.stage.name = "暗灰色舞台" Laya.stage.on(Event.MOUSE_DOWN, this, onDown); } function createCoralRect() { var coralRect = new Sprite(); coralRect.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.heigh...

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