Skip to content
BasePanel<T>

UI / BasePanel

BasePanel<T> Class

The base class of the panel class, which can be used to control a interface

Precautions

Note: If the subclass rewrites the onAwake and onAdded methods, please call the corresponding method of super

Type parameters

Textends UIScript

Hierarchy

Table of contents

Accessors

size(): Vector2
Panel size
view(): T
The interface controlled by the panel
click

Accessors

holdBackTouch(value: boolean): void
Do you block scene clicks
isShow(): boolean
Determine whether the interface is in display state

Methods

onAdded(): void other
Lifecycle - Triggered when added to the parent node, may be called multiple times
onAwake(): void other
Life cycle method - the construction panel is automatically triggered and will only be called call
click

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

Construction method

Type parameters

Textends UIScript<T>

Parameters

viewClass TypeName<T>Interface class

Overrides

BaseView.constructor

Accessors


size

get size(): Vector2

set size(value): void

Panel size

Returns

Vector2

Panel size

Parameters

valueVector2

view

Protected get view(): T

The interface controlled by the panel

Returns

T

Methods


onAdded

Protected onAdded(): void other

Lifecycle - Triggered when added to the parent node, may be called multiple times


onAwake

Protected onAwake(): void other

Life cycle method - the construction panel is automatically triggered and will only be called call