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

Adds the scoreboard and help items to the tab menu.
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.
Creates the fonts once the schema has been loaded on the client.
Makes Derma use the Flux skin by default.
Flashes the game window in the taskbar when the intro panel appears.
Centers a newly opened panel within the tab menu.
Recreates the fonts so that they fit the new resolution.
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.
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.
Opens the tab menu in place of the default scoreboard, unless the ShouldScoreboardShow hook returns false, and notes when the key was pressed.

Hooks

GM:AddTabMenuItems(menu)

client packages/active_ui/hooks/cl_hooks.lua:58

Implements hook AddTabMenuItems

Adds the scoreboard and help items to the tab menu.

Parameters

  • menu Panel the fl_tab_menu being built

GM:CreateScoreboardPlayerMenu(menu, target, _card)

client packages/active_ui/hooks/cl_hooks.lua:79

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

GM:FluxClientSchemaLoaded()

client packages/active_ui/hooks/cl_hooks.lua:11

Implements hook FluxClientSchemaLoaded

Creates the fonts once the schema has been loaded on the client.

GM:ForceDermaSkin()

client packages/active_ui/hooks/cl_hooks.lua:17

Makes Derma use the Flux skin by default.

Returns

  • String name of the skin

GM:OnIntroPanelCreated()

client packages/active_ui/hooks/cl_hooks.lua:121

Implements hook OnIntroPanelCreated

Flashes the game window in the taskbar when the intro panel appears.

GM:OnMenuPanelOpen(menu_panel, active_panel)

client packages/active_ui/hooks/cl_hooks.lua:113

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:26

Implements 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

GM:PreRebuildFactionCategories(players_table)

client packages/active_ui/hooks/cl_hooks.lua:100

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

GM:ScoreboardHide()

client packages/active_ui/hooks/cl_hooks.lua:43

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.

GM:ScoreboardShow()

client packages/active_ui/hooks/cl_hooks.lua:32

Opens the tab menu in place of the default scoreboard, unless the ShouldScoreboardShow hook returns false, and notes when the key was pressed.

Defined in