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

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

1. UI-ScrollBar [ 100%]

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

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

2. UI-ScrollBar [ 99%]

...placeHScroller(); placeVScroller(); } function placeHScroller() { 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 ...

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

3. UI-Slider [ 99%]

...HSlider() { const HSlider = Laya.HSlider, Handler = Laya.Handler; let hs = new HSlider("res/ui/hslider.png"); Laya.stage.addChild(hs); hs.width = 300; hs.pos(50, 170); hs.min = 0; hs.max = 100; hs.value = 50; hs.tick = 1; hs.changeHandler = new Handler(this, this.onChange); } placeVSlider() { const ...

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

4. UI-Slider [ 99%]

...e() { placeHSlider(); placeVSlider(); } function placeHSlider() { var hs = new HSlider(); hs.skin = "../../res/ui/hslider.png"; hs.width = 300; hs.pos(50, 170); hs.min = 0; hs.max = 100; hs.value = 50; hs.tick = 1; hs.changeHandler = new Handler(this, onChange); Laya.stage.addChild(hs); } function p...

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

5. UI-Tree [ 98%]

...析tree的数据 let xml = Utils.parseXMLFromString(treeData); let tree = new Tree(); tree.scrollBarSkin = "res/ui/vscroll.png"; tree.itemRender = Item; tree.xml = xml; tree.size(300, 300); tree.x = (Laya.stage.width - tree.width) / 2; tree.y = (Laya.stage.height - tree.height) / 2; Laya.stage.addCh...

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

6. 技术文档的代码无法编译运行(var efc = new ui.TestPUI();) [ 98%]

技术文档的代码无法编译运行(var efc = new ui.TestPUI();) javascript->layaair ide篇->使用ide创作->创建动效模板 当我按照教程学习的时候,“在项目中展示动效模板的效果 ”的代码无法运行。 var efc = new ui.TestPUI(); 请问下“ui.Tes...

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

7. UI-Tree [ 98%]

... { Item.__super.call(this); this.right = 0; this.left = 0; var selectBox = new Clip("../../res/ui/tree/clip_selectBox.png", 1, 2); selectBox.name = "selectBox"; //设置 selectBox 的name 为“selectBox”时,将被识别为树结构的项的背景。2帧:悬停时背景、选中时背景。 se...

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

8. UI-Dialog [ 97%]

...alog = Laya.Dialog, Image = Laya.Image, Button = Laya.Button; let dialog = new Dialog(); let bg = new Image(assets[0]); dialog.addChild(bg); let button = new Button(assets[1]); button.name = Dialog.CLOSE; button.pos(DIALOG_WIDTH - CLOSE_BTN_WIDTH - CLOSE_BTN_PADDING, CLOSE_BTN_PADDING); dialog.addCh...

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

9. UI-List [ 97%]

...ctor(){ super(); const Image = Laya.Image; this.size(WID, HEI); this.img = new Image(); this.addChild(this.img); } setImg(src) { this.img.skin = src; } } class UI_List { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; //...

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

10. UI-List [ 97%]

...function Item() { Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.img); this.setImg = function(src) { this.img.skin = src; } } Laya.class(Item, "Item", Box); // 主要逻辑代码 var Stage = Laya.Stage; var List = Laya.List; var Handler = Laya.Handler; var W...

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