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

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

1. UI-ScrollBar [ 100%]

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

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

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

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

5. UI-Dialog [ 97%]

..., onSkinLoadComplete)); })(); function onSkinLoadComplete() { var dialog = new Dialog(); var bg = new Image(assets[0]); dialog.addChild(bg); var button = new Button(assets[1]); button.name = Dialog.CLOSE; button.pos(DIALOG_WIDTH - CLOSE_BTN_WIDTH - CLOSE_BTN_PADDING, CLOSE_BTN_PADDING); dialog.addCh...

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

6. UI-Clip [ 96%]

...(); showTotalSeconds(); createController(); } function showBg() { var 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); } function createTimerAnimation() { counter = new Clip(clipSkin, 10, 1); counter.aut...

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

7. UI-ProgressBar [ 95%]

...te(this, onLoadComplete)); })(); function onLoadComplete() { progressBar = new ProgressBar("../../res/ui/progressBar.png"); progressBar.width = 400; progressBar.x = (Laya.stage.width - progressBar.width) / 2; progressBar.y = Laya.stage.height / 2; progressBar.sizeGrid = "5,5,5,5"; progressBar.change...

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

8. UI-ColorPicker [ 95%]

...SkinLoaded)); })(); function onColorPickerSkinLoaded() { var colorPicker = new ColorPicker(); colorPicker.selectedColor = "#ff0033"; colorPicker.skin = skin; colorPicker.pos(100, 100); colorPicker.changeHandler = new Handler(this, onChangeColor, [colorPicker]); Laya.stage.addChild(colorPicker); onCh...

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

9. 动画-新版骨骼动画 [ 94%]

...stage.screenMode = Laya.Stage.SCREEN_NONE; var scene = Laya.stage.addChild(new Laya.Scene()); var camera = scene.addChild(new Laya.Camera(0, 0.1, 1000)); camera.transform.translate(new Laya.Vector3(0, 1.5, 4)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); var directionLight = s...

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

10. UI-ComboBox [ 94%]

...00); cb.autoSize = false; } function createComboBox(skin) { var comboBox = new ComboBox(skin, "item0,item1,item2,item3,item4,item5"); comboBox.labelSize = 30; comboBox.itemSize = 25; comboBox.selectHandler = new Handler(this, onSelect, [comboBox]); Laya.stage.addChild(comboBox); return comboBox; } f...

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