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

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

1. 按钮组件 · LayaAir3.4 · 引擎文档 · 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.4 · 引擎文档 · LAYABOX [ 93%]

...接使用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 [ 87%]

...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. Steam扩展实例 · LayaAir3.4 · 引擎文档 · LAYABOX [ 74%]

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

5. 场景管理 · LayaAir3.4 · 引擎文档 · 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

6. 插件开发说明 · LayaAir3.4 · 引擎文档 · LAYABOX [ 66%]

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

7. UI组件资源命名规则 · LayaAir3.4 · 引擎文档 · LAYABOX [ 66%]

...资源文件名前缀 资源文件名前缀缩写 Image 图像 image_ img_ Button 按钮 button_ btn_ ComboBox 下拉框 comboBox_ combo_ TextInput 文本输入 textInput_ input_ TextArea 文本域 textArea_ area_ CheckBox 多选框 checkBox_ check_ Label 显示文本 label_ 无缩写 RadioGroup 单...

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

8. 复选框组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 59%]

...heckBox多选框组件(CheckBox) CheckBox是多选框组件,继承自Button。它由两部分组成,选择状态框及内容说明标签。其中选择状态框是图片资源,内容说明标签为文本。CheckBox组件的属性接口介绍请参考CheckBox API。 一、通过LayaAir IDE...

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

9. 位图切片组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 59%]

...nds Laya.Script { // 以下资源来自“引擎API使用示例” private buttonSkin: string = "resources/res/ui/button-7.png"; private clipSkin: string = "resources/res/ui/num0-9.png"; private bgSkin: string = "resources/res/ui/coutDown.png"; counter: any; controller: any; currFrame: any; //组件...

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

10. 滑动条组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 59%]

...,将改变ProgressMesh的填充比例,而是图片的高度。 Grip Button 滑块按钮精灵。注意:grip按钮应该与bar对象建立一个关联,并放置在进度条处于最大值时的位置。这个关联是: 正向:grip左左关联到bar或者顶顶关联到bar_v; 反向...

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