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

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

1. 按钮组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 100%]

按钮组件(Button)1、LayaAir IDE中使用Button组件1.1 创建Button组件1.2 Button属性1.3 脚本控制Button2、Button代码创建按钮组件(Button) 1、LayaAir IDE中使用Button组件 按钮(Button)组件是最常用的组件之一,可以显示文本标签、图标或者...

来源: Laya3.0_文档 发布时间: 20251010

2. UI运行时 · LayaAir3.3 · 引擎文档 · LAYABOX [ 95%]

...接使用this.即可使用。例如下面的代码: onAwake(): void { // Button添加鼠标事件,让Image不显示 this.Button.on( Laya.Event.MOUSE_DOWN, this, ()=>{ this.Image.visible = false; }); } 运行此场景来看看效果,如动图2-7所示。 (动图2-7) UI组件脚本就已...

来源: Laya3.0_文档 发布时间: 20251010

3. UI弹窗 · LayaAir3.0文档 · LAYABOX [ 85%]

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

来源: Laya3.0_文档 发布时间: 20230303

4. 弹窗视图组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 84%]

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

来源: Laya3.0_文档 发布时间: 20251024

5. 滚动条组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 82%]

...般用一个空节点来表示就可以了,它只作占位用途。 Grip Button 滑块按钮精灵。表示滚动条中间的滑块按钮。 Arrow Button 1 如果是水平滚动条,它表示左边的箭头按钮;如果是垂直滚动条,它表示上边的箭头按钮。它是可选的,如...

来源: Laya3.0_文档 发布时间: 20251010

6. 单选框组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 81%]

...、通过代码创建Radio组件单选框组件(Radio) Radio继承自Button,它的很多属性也继承自Button,所以前面Button中介绍过的这里就不再过多讲述。Radio的详细用法可以参考Radio API。 一、通过LayaAir IDE创建Radio组件 1.1 创建Radio 使用LayaAir ...

来源: Laya3.0_文档 发布时间: 20251010

7. 下拉框组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 80%]

...Widget 设置图标精灵。 通常,下拉框内也需要一个名称为"button"的控制器,因为他和按钮的形态是一样的。可以按设计按钮的方式设计下拉框。当下拉框被点击下拉时,“button”控制器将停留在“down”页,下拉列表收回后,“butt...

来源: Laya3.0_文档 发布时间: 20251010

8. Steam扩展实例 · LayaAir3.3 · 引擎文档 · LAYABOX [ 76%]

...Class() export class NewScript extends Laya.Script { @property({type: Laya.Button}) public initBtn: Laya.Button; onEnable(): void { this.initBtn.on(Laya.Event.CLICK, this.onInit); } onInit() { alert(extendLib.initializeSteam()); } } 构建发布Windows后,需要在exe的同级目录下,新建一...

来源: Laya3.0_文档 发布时间: 20251010

9. 场景管理 · LayaAir3.3 · 引擎文档 · LAYABOX [ 69%]

...lass() export class NewScript extends Laya.Script { @property({ type: Laya.Button }) public uiBtn: Laya.Button; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.uiBtn.on(Laya.Event.CLICK, th...

来源: Laya3.0_文档 发布时间: 20251010

10. 插件开发说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 62%]

...Color; /** * 编辑器默认的文字颜色 */ textColor: gui.Color; createButton(autoSize?: boolean): gui.Button; createIconButton(flat?: boolean): gui.Button; createCheckbox(autoSize?: boolean): gui.Button; createIconCheckbox(flat?: boolean): gui.Button; createRadio(): gui.Button; createComboBox()...

来源: Laya3.0_文档 发布时间: 20251010