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

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

1. UI弹窗 · LayaAir3.0文档 · LAYABOX [ 100%]

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

2. UI运行时 · LayaAir3.0文档 · LAYABOX [ 99%]

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

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

3. 弹窗视图组件 · LayaAir3.0文档 · LAYABOX [ 97%]

...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_文档 发布时间: 20231129

4. 按钮组件 · LayaAir3.0文档 · LAYABOX [ 96%]

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

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

5. 垂直布局容器组件 · LayaAir3.0文档 · LAYABOX [ 94%]

...可以通过鼠标左键长按滑动来输入数值。假设VBox有三个Button组件子对象,调节space属性的效果如动图1-3所示。 (动图1-3) VBox的子节点无论在IDE中怎样排列,在设置了align属性后都会变成相对应的水平排序,如动图1-4所示。 (动...

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

6. 水平布局容器组件 · LayaAir3.0文档 · LAYABOX [ 94%]

...可以通过鼠标左键长按滑动来输入数值。假设HBox有三个Button组件子对象,调节space属性的效果如动图1-3所示。 (动图1-3) HBox的子节点无论在IDE中怎样排列,在设置了align属性后都会变成相对应的垂直排序,如动图1-4所示。 (动...

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

7. 场景管理 · LayaAir3.0文档 · LAYABOX [ 74%]

...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_文档 发布时间: 20230717

8. 项目资源面板说明 · LayaAir3.0文档 · LAYABOX [ 71%]

...式是通过搜索查找 3.1 文字搜索 通过在搜索框中,输入“button”可以快速检索出Button组件,并可快速拖入2D场景中,如动图3-1所示 (动图3-1) 3.2 类型搜索 通过点击类型搜索按钮,选择文件类型,比如选择“LightingSettings”,可...

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

9. 插件开发说明 · LayaAir3.0文档 · LAYABOX [ 69%]

...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_文档 发布时间: 20240918

10. UI组件详解 · LayaAir3.0文档 · LAYABOX [ 67%]

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

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