Client side of the interface hooks: the GM handlers that make Derma use the Flux skin,
create the fonts once the schema has loaded and again when the screen resolution changes,
open the tab menu in place of the scoreboard, fill the tab menu and the player menu of
the scoreboard, center the panels of the tab menu and flash the game window when the
intro appears.
Summary
Hooks
Hooks
Implements hook AddTabMenuItems
Adds the scoreboard and help items to the tab menu.
Parameters
- menu Panel the fl_tab_menu being built
Implements hook CreateScoreboardPlayerMenu
Adds the options that the scoreboard offers for every player to the menu of a player card: opening their Steam profile and copying their SteamID. Bots have neither.
Parameters
- menu Panel the DermaMenu being filled
- target Player the player the card shows
- _card Panel the fl_scoreboard_player card that was clicked
Implements hook FluxClientSchemaLoaded
Creates the fonts once the schema has been loaded on the client.
Makes Derma use the Flux skin by default.
Returns
- String name of the skin
Implements hook OnIntroPanelCreated
Flashes the game window in the taskbar when the intro panel appears.
Implements hook OnMenuPanelOpen
Centers a newly opened panel within the tab menu.
Parameters
- menu_panel Panel the tab menu
- active_panel Panel the panel that has been opened
GM:OnResolutionChanged(_new_w, _new_h, _old_w, _old_h)
client packages/active_ui/hooks/cl_hooks.lua:26Implements hook OnResolutionChanged
Recreates the fonts so that they fit the new resolution.
Parameters
- _new_w Number new screen width
- _new_h Number new screen height
- _old_w Number previous screen width
- _old_h Number previous screen height
Implements hook PreRebuildFactionCategories
Takes the players that are kept off the scoreboard out of the lists that the Factions plugin builds its scoreboard categories from, so that PlayerShouldShowOnScoreboard also applies when the players are grouped by faction. Handles the PreRebuildFactionCategories hook of that plugin and runs after the plugins that regroup the players.
Parameters
- players_table Map lists of players keyed by category
Closes the tab menu when the scoreboard key is released after being held for longer than 0.3 seconds, unless the ShouldScoreboardHide hook returns false. A short press leaves the menu open, and so does a menu that was opened from code.
Opens the tab menu in place of the default scoreboard, unless the ShouldScoreboardShow hook returns false, and notes when the key was pressed.