Skip to content
BagUI

拓展 / BagUI

BagUI Class

背包界面父类,继承这个类来实现自己的背包界面,使用BagModule.skin来指定皮肤

Hierarchy

Implements

Table of contents

Accessors

closeBtn(): StaleButton client
关闭按钮
content(): Canvas client
背包格子的容器
filterBox(): InputBox client
过滤输入框
filterCanvas(): Canvas client
搜索框所在容易,打开/关闭搜索功能隐藏/显示该容器
click

Accessors

canUpdate(): boolean client
获取是否能触发 UI 中 onUpdate 生命周期函数
fullScreen(inFull: boolean): void client
设置随父节点全屏适配,会验证父节点大小以保证跟随父节点的大小
layer(): number client
获取 UI 的 Layer 层级
rootCanvas(): Canvas client
获取 UI 的根 Canvas 节点
uiObject(): Widget
获取 UI 顶层控件对象
uiWidgetBase(): UserWidget client
获取 UI 顶层控件对象
visible(): boolean client
获取 UI 是否显示

Methods

click

Methods

destroy(): void client
销毁 UI 对象
detectDrag(dragKey: Keys): EventReply client
触发 DragDrop 事件的检测
detectDragIfPressed(inPointEvent: PointerEvent, dragKey: Keys): EventReply client
事件检测通过,触发 DragDrop 事件的回复。
newDragDrop(inVisualWidget: Widget, inTag?: string, inPayLoad?: any, inPivot?: DragPivot, inOffset?: Vector2): DragDropOperation client
创建 DragDrop 事件
remove(): void client
移除 UI 对象
setVisible(inVisible: boolean SlateVisibility, ...params: any[]): void client
设置 UI 是否显示
addBehavior(key: string, value: any): void client
添加一个全局行为
clearBehavior(): void client
清空全局一个行为
getBehavior(key: string): any client
执行一个全局的行为
removeBehavior(key: string): void client
移除全局一个行为

Accessors


closeBtn

Abstract get closeBtn(): StaleButton client

关闭按钮

Returns

StaleButtonIBagSkin.closeBtn

content

Abstract get content(): Canvas client

背包格子的容器

Returns

CanvasIBagSkin.content

filterBox

Abstract get filterBox(): InputBox client

过滤输入框

Returns

InputBoxIBagSkin.filterBox

filterCanvas

Abstract get filterCanvas(): Canvas client

搜索框所在容易,打开/关闭搜索功能隐藏/显示该容器

Returns

CanvasIBagSkin.filterCanvas

Methods