#
Class: Leaderboard#
HierarchyHandle<leaderboard>
↳ Leaderboard
#
Constructors#
constructornew Leaderboard(): Leaderboard
Create a Leaderboard object
note
Leaderboards initially have 0 rows, 0 columns, and no label.
bug
Do not use this in a global initialisation as it crashes the game there.
Returns: Leaderboard
Defined in: handles/leaderboard.ts:6
#
Properties#
handle• Readonly
handle: leaderboard
Defined in: handles/handle.ts:6
#
Accessors#
displayeddisplayed(): boolean
Returns: boolean
Defined in: handles/leaderboard.ts:36
#
idid(): number
Get the unique ID of the handle. The ID is recycled once you destroy the object.
Returns: number
The unique ID of a handle object.
Defined in: handles/handle.ts:18
#
itemCountitemCount(): number
Returns: number
Defined in: handles/leaderboard.ts:40
itemCount(count: number): void
#
Parameters:Name | Type |
---|---|
count | number |
Returns: void
Defined in: handles/leaderboard.ts:44
#
labellabel(): string
Returns: string
Defined in: handles/leaderboard.ts:116
label(value: string): void
#
Parameters:Name | Type |
---|---|
value | string |
Returns: void
Defined in: handles/leaderboard.ts:112
#
Methods#
addItemaddItem(label: string, value: number, p: MapPlayer): void
#
Parameters:Name | Type |
---|---|
label | string |
value | number |
p | MapPlayer |
Returns: void
Defined in: handles/leaderboard.ts:20
#
clearclear(): void
Returns: void
Defined in: handles/leaderboard.ts:24
#
destroydestroy(): void
Returns: void
Defined in: handles/leaderboard.ts:28
#
displaydisplay(flag?: boolean): void
#
Parameters:Name | Type | Default value |
---|---|---|
flag | boolean | true |
Returns: void
Defined in: handles/leaderboard.ts:32
#
getPlayerIndexgetPlayerIndex(p: MapPlayer): number
#
Parameters:Name | Type |
---|---|
p | MapPlayer |
Returns: number
Defined in: handles/leaderboard.ts:48
#
hasPlayerItemhasPlayerItem(p: MapPlayer): void
#
Parameters:Name | Type |
---|---|
p | MapPlayer |
Returns: void
Defined in: handles/leaderboard.ts:52
#
removeItemremoveItem(index: number): void
#
Parameters:Name | Type |
---|---|
index | number |
Returns: void
Defined in: handles/leaderboard.ts:56
#
removePlayerItemremovePlayerItem(p: MapPlayer): void
#
Parameters:Name | Type |
---|---|
p | MapPlayer |
Returns: void
Defined in: handles/leaderboard.ts:60
#
setItemLabelsetItemLabel(item: number, label: string): void
#
Parameters:Name | Type |
---|---|
item | number |
label | string |
Returns: void
Defined in: handles/leaderboard.ts:64
#
setItemLabelColorsetItemLabelColor(item: number, red: number, green: number, blue: number, alpha: number): void
#
Parameters:Name | Type |
---|---|
item | number |
red | number |
green | number |
blue | number |
alpha | number |
Returns: void
Defined in: handles/leaderboard.ts:68
#
setItemStylesetItemStyle(item: number, showLabel?: boolean, showValues?: boolean, showIcons?: boolean): void
#
Parameters:Name | Type | Default value |
---|---|---|
item | number | - |
showLabel | boolean | true |
showValues | boolean | true |
showIcons | boolean | true |
Returns: void
Defined in: handles/leaderboard.ts:72
#
setItemValuesetItemValue(item: number, value: number): void
#
Parameters:Name | Type |
---|---|
item | number |
value | number |
Returns: void
Defined in: handles/leaderboard.ts:76
#
setItemValueColorsetItemValueColor(item: number, red: number, green: number, blue: number, alpha: number): void
#
Parameters:Name | Type |
---|---|
item | number |
red | number |
green | number |
blue | number |
alpha | number |
Returns: void
Defined in: handles/leaderboard.ts:80
#
setLabelColorsetLabelColor(red: number, green: number, blue: number, alpha: number): void
#
Parameters:Name | Type |
---|---|
red | number |
green | number |
blue | number |
alpha | number |
Returns: void
Defined in: handles/leaderboard.ts:84
#
setPlayerBoardsetPlayerBoard(p: MapPlayer): void
#
Parameters:Name | Type |
---|---|
p | MapPlayer |
Returns: void
Defined in: handles/leaderboard.ts:88
#
setStylesetStyle(showLabel?: boolean, showNames?: boolean, showValues?: boolean, showIcons?: boolean): void
#
Parameters:Name | Type | Default value |
---|---|---|
showLabel | boolean | true |
showNames | boolean | true |
showValues | boolean | true |
showIcons | boolean | true |
Returns: void
Defined in: handles/leaderboard.ts:92
#
setValueColorsetValueColor(red: number, green: number, blue: number, alpha: number): void
#
Parameters:Name | Type |
---|---|
red | number |
green | number |
blue | number |
alpha | number |
Returns: void
Defined in: handles/leaderboard.ts:96
#
sortByLabelsortByLabel(asc?: boolean): void
#
Parameters:Name | Type | Default value |
---|---|---|
asc | boolean | true |
Returns: void
Defined in: handles/leaderboard.ts:100
#
sortByPlayersortByPlayer(asc?: boolean): void
#
Parameters:Name | Type | Default value |
---|---|---|
asc | boolean | true |
Returns: void
Defined in: handles/leaderboard.ts:104
#
sortByValuesortByValue(asc?: boolean): void
#
Parameters:Name | Type | Default value |
---|---|---|
asc | boolean | true |
Returns: void
Defined in: handles/leaderboard.ts:108
#
fromHandlestatic fromHandle(handle: leaderboard): Leaderboard
#
Parameters:Name | Type |
---|---|
handle | leaderboard |
Returns: Leaderboard
Defined in: handles/leaderboard.ts:120
#
fromPlayerstatic fromPlayer(p: MapPlayer): Leaderboard
#
Parameters:Name | Type |
---|---|
p | MapPlayer |
Returns: Leaderboard
Defined in: handles/leaderboard.ts:124