Skip to content
ItemDeleteUI

拓展 / ItemDeleteUI

ItemDeleteUI Class

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

Hierarchy

Implements

Table of contents

Accessors

cancelButton(): StaleButton client
取消按钮
closeButton(): StaleButton client
关闭按钮
itemIcon(): Image client
物品图标
nameText(): TextBlock client
物品名字标签
okButton(): StaleButton 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

onItemShow(cfg: ItemConfig): void client
当显示道具时调用
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


cancelButton

Abstract get cancelButton(): StaleButton client

取消按钮

Optional

可选参数

Returns

StaleButtonIItemDeleteSkin.cancelButton

closeButton

Abstract get closeButton(): StaleButton client

关闭按钮

Returns

StaleButtonIItemDeleteSkin.closeButton

itemIcon

Abstract get itemIcon(): Image client

物品图标

Optional

可选参数

Returns

ImageIItemDeleteSkin.itemIcon

nameText

Abstract get nameText(): TextBlock client

物品名字标签

Optional

可选参数

Returns

TextBlockIItemDeleteSkin.nameText

okButton

Abstract get okButton(): StaleButton client

确认按钮

Returns

StaleButtonIItemDeleteSkin.okButton

Methods


onItemShow

Abstract onItemShow(cfg): void client

当显示道具时调用

Parameters

cfg ItemConfig道具配置