The scoreboard page of the tab menu (fl_scoreboard): a scrollable list with one fl_scoreboard_player card per initialized player, drawn by the active theme's PaintScoreboard hook, which also writes how many players are online. rebuild recreates the cards. A PreRebuildScoreboard handler can build the list itself, which is how the Factions plugin groups the players by faction, and RebuildScoreboard handlers can add to the default list. Either way a player is left out when a PlayerShouldShowOnScoreboard handler returns false.

Summary

Methods

Counts the players for the line of players online: everyone who is connected, including those who are still loading, except for the players that are kept off the scoreboard.
Returns the size the tab menu gives this panel when it opens it.
Returns the text of the line of players online, as it was when the scoreboard was last rebuilt.
Init()client
Creates the scroll panel that holds the player cards.
Delegates drawing of the scoreboard to the active theme's PaintScoreboard hook.
rebuild()client
Counts the players online, removes the existing player cards and creates one for every player that is listed, then runs the RebuildScoreboard hook.
Checks whether a player is listed on the scoreboard: they are once they have been initialized, unless a PlayerShouldShowOnScoreboard handler returns false.

Methods

PANEL:count_players()

client packages/active_ui/views/cl_scoreboard.lua:56

Counts the players for the line of players online: everyone who is connected, including those who are still loading, except for the players that are kept off the scoreboard.

Returns

  • Number

PANEL:get_menu_size()

client packages/active_ui/views/cl_scoreboard.lua:132

Returns the size the tab menu gives this panel when it opens it.

Returns

  • Number width
  • Number height

PANEL:get_online_text()

client packages/active_ui/views/cl_scoreboard.lua:71

Returns the text of the line of players online, as it was when the scoreboard was last rebuilt. The theme draws it in its PaintScoreboard hook.

Returns

  • String translated text, such as 'Players online: 12 / 32'

Creates the scroll panel that holds the player cards.

Delegates drawing of the scoreboard to the active theme's PaintScoreboard hook.

Parameters

  • w Number panel width
  • h Number panel height

Counts the players online, removes the existing player cards and creates one for every player that is listed, then runs the RebuildScoreboard hook. Only the count is done if PreRebuildScoreboard returns a value.

PANEL:should_show_player(target)

client packages/active_ui/views/cl_scoreboard.lua:40

Checks whether a player is listed on the scoreboard: they are once they have been initialized, unless a PlayerShouldShowOnScoreboard handler returns false.

Parameters

  • target Player

Returns

  • Boolean

Defined in