Skip to content
LeaderboardItemPanelBase<T>

UI / LeaderboardItemPanelBase

LeaderboardItemPanelBase<T> Class

The subUI in the main interface of the leaderboard is used to display a record

Type parameters

Textends ILeaderboardItemView

Hierarchy

Table of contents

Accessors

playerId(): number other
The playerId of the currently displayed object
click

Accessors

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

Methods

onAddToCanvas(playerId: number, rankIndex: number): void other
Display on canvas call, please overwrite
onFieldSet(playerId: number, rankIndex: number, fieldId: number, fieldValue: string number, textBlockIndex: number, textBlock: TextBlock): void other
After setting the field content and calling it, please overwrite it
click

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

Construction method

Type parameters

Textends ILeaderboardItemView<T>

Parameters

viewClass TypeName<T>Interface class

Overrides

BasePanel.constructor

Accessors


playerId

Protected get playerId(): number other

The playerId of the currently displayed object

Returns

number

Methods


onAddToCanvas

Protected onAddToCanvas(playerId, rankIndex): void other

Display on canvas call, please overwrite

Parameters

playerId numberPlayer id range: depending on Player ID type: integer
rankIndex numberRanking (starting from 0) range: reasonable is sufficient type: integer

onFieldSet

Protected onFieldSet(playerId, rankIndex, fieldId, fieldValue, textBlockIndex, textBlock): void other

After setting the field content and calling it, please overwrite it

Parameters

playerId numberPlayer ID
range: determined by ID length type: integer
rankIndex numberRanking index (starting from 0)
range: reasonable is sufficient type: integer
fieldId numberField index (if it is a ranking field, this parameter is mull)
range: reasonable, type: integer
fieldValue string numberField display content
Range: reasonable is sufficient, no restrictions are imposed Type: integer
textBlockIndex numberText widget index
range: reasonable, unlimited type: integer
textBlock TextBlockText widget