UI / BaseView
BaseView Class
Base class of interface class
Hierarchy
Table of contents
Accessors
holdBackTouch(value : boolean ): void |
---|
Do you block scene clicks |
isShow(): boolean |
Determine whether the interface is in display state |
click
Accessors
canUpdate(): boolean other |
---|
Obtain whether the onUpdate lifecycle function in the UI can be triggered |
fullScreen(inFull : boolean ): void other |
Setting up full screen adaptation with the parent node will verify the size of the parent node to ensure that it follows the size of the parent node |
layer(): number other |
Get the layer layer of UI |
rootCanvas(): Canvas other |
Get the root Canvas node of the UI |
uiObject(): Widget |
Get UI top level widget object |
uiWidgetBase(): UserWidget other |
Get UI top level widget object |
visible(): boolean other |
Get whether the UI is displayed |
Methods
getCanvasChildren<T : extends Widget <T >>(canvas : Canvas , getType : TypeName <T : extends Widget <T >>): T : extends Widget <T >[] other |
---|
Retrieve sub object sequence of canvas based on type |
hide(): void other |
Close the globally unique interface |
show(...params : any []): void other |
Display globally unique interface |
create<T : extends UIScript <T >>(): T : extends UIScript <T > other |
Create interface |
hide(): void other |
Close the globally unique interface |
show(...params : any []): void other |
Display globally unique interface |
click
Methods
destroy(): void other |
---|
Destroy UI objects |
detectDrag(dragKey : Keys ): EventReply other |
Trigger detection of DragDrop event |
detectDragIfPressed(inPointEvent : PointerEvent , dragKey : Keys ): EventReply other |
Event detection passed, triggering a reply to the DragDrop event. |
newDragDrop(inVisualWidget : Widget , inTag? : string , inPayLoad? : any , inPivot? : DragPivot , inOffset? : Vector2 ): DragDropOperation other |
Create DragDrop event |
remove(): void other |
Remove UI object |
setVisible(inVisible : boolean SlateVisibility , ...params : any []): void other |
Set whether the UI is displayed |
addBehavior(key : string , value : any ): void other |
Add a global behavior |
clearBehavior(): void other |
Clear a global action |
getBehavior(key : string ): any other |
Execute a global action |
removeBehavior(key : string ): void other |
Remove a global behavior |
Accessors
holdBackTouch
• | ||
---|---|---|
Do you block scene clicks Parameters
|
isShow
• |
---|
Determine whether the interface is in display state Returns |
boolean |
---|
Methods
getCanvasChildren
• Protected
getCanvasChildren<T
>(canvas
, getType
): T
[] other
Retrieve sub object sequence of canvas based on type
Parameters
canvas Canvas | Current component |
---|---|
getType TypeName <T > | The type you want to obtain |
Returns
T [] | All sub objects that match the type |
---|
Type parameters
T | extends Widget <T > |
---|
hide
• hide(): void
other
Close interface
show
• show(...params
): void
other
Display interface
Parameters
...params any [] | Parameter sequence, the parameters will be transferred to the onShow life cycle method in the interface |
---|
Parameters
...params any [] | Parameter sequence, the parameters will be transferred to the onShow life cycle method in the interface |
---|
create
• Static
create<T
>(): T
other
Create interface
Returns
T | Interface object |
---|
Type parameters
T | extends UIScript <T > |
---|
hide
• Static
hide(): void
other
Close the globally unique interface
show
• Static
show(...params
): void
other
Display globally unique interface
Precautions
This method will first create a globally unique interface
Parameters
...params any [] | Parameter sequence, the parameters will be transferred to the onShow life cycle method in the interface |
---|