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

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

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-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

3. 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

4. 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

5. 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

6. UI-Clip [ 96%]

...; this.createController(); } showBg() { const Image = Laya.Image; let bg = new Image(bgSkin); bg.size(224, 302); bg.pos(Laya.stage.width - bg.width >> 1, Laya.stage.height - bg.height >> 1); Laya.stage.addChild(bg); } createTimerAnimation() { const Clip = Laya.Clip; this.counter = new Clip(clipSkin,...

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

7. UI-ColorPicker [ 96%]

... ColorPicker = Laya.ColorPicker, Handler = Laya.Handler; let colorPicker = new ColorPicker(); colorPicker.selectedColor = "#ff0033"; colorPicker.skin = skin; colorPicker.pos(100, 100); colorPicker.changeHandler = new Handler(this, this.onChangeColor, [colorPicker]); Laya.stage.addChild(colorPicker);...

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

8. UI-ProgressBar [ 96%]

...ProgressBar = Laya.ProgressBar, Handler = Laya.Handler; this.progressBar = new ProgressBar("res/ui/progressBar.png"); Laya.stage.addChild(this.progressBar); this.progressBar.width = 400; this.progressBar.x = (Laya.stage.width - this.progressBar.width ) / 2; this.progressBar.y = Laya.stage.height / 2...

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

9. UI-ComboBox [ 95%]

...) { const ComboBox = Laya.ComboBox, Handler = Laya.Handler; let comboBox = new ComboBox(skin, "item0,item1,item2,item3,item4,item5"); Laya.stage.addChild(comboBox); comboBox.labelSize = 30; comboBox.itemSize = 25; comboBox.selectHandler = new Handler(this, this.onSelect, [comboBox]); return comboBox...

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

10. UI-Image [ 95%]

...t.show(); this.setup(); } setup() { const Image = Laya.Image; let dialog = new Image("res/ui/dialog (3).png"); Laya.stage.addChild(dialog); dialog.pos(165, 62.5); } } new UI_Image();module laya { import Stage = Laya.Stage; import Image = Laya.Image; import WebGL = Laya.WebGL; export class UI_Image {...

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