TF2 HUD Editing Guide
In-Depth: Main Menu
The main meun is the menu you see when you first open TF2. Heres how to edit it.
The two resource files that define TF2's main menu are:
mainmenuoverride.res - This file defines the styles and layout of the entire main menu, as well as a few dialogs that appear on the main menu.
gamemenu.res - Is a list of all the buttons on the main menu.
top
gamemenu.res
This file contains a list of every button on the Main Menu.
Some buttons listed here are explicitly defined in mainmenuoverride.res. Others are not, and then use a generic style for buttons, which is also defined in mainmenuoverride.res.
The format of this file is a control list, with each control braced with a buttons name, and two properties defining the label on the button and the command the button executes.
"ServerBrowserButton" { "label" "#MMenu_Servers" "command" "OpenServerBrowser" "OnlyAtMenu" "1" }
Some of these control entries have an extra property which only appears in this file.
Special Properties
These properties don't have to be used, but when they do, they change when the button is visible.
"OnlyAtMenu" "1"
This property means the button will only be visible on the main menu when not in-game.
"OnlyInGame" "1"
This property means the button will only be visible on the main menu when in-game.
Commands
The command property of the button determines what command is executed when the button is clicked. There are several UI commands for TF2, which you can see on existing buttons.
But we can also execute console (engine) commands with buttons on the main menu by using the engine command:
"command" "engine cl_hud_minmode 1"
This can be used to have buttons on the main menu that change settings, like minmode. This trick can also be used in mainmenuoverride.res
top
mainmenuoverride.res
The mainmenuoverride.res defines the layout and style of everything on the main menu.
List of Controls / Things in mainmenuoverride.res
Control | What it defines |
MainMenuOverride | The area of the screen the main menu will occupy. The subcontrol button_kv defines the style and layout for buttons in gamemenu.res that arent explicitly defined. |
Background | Background image of the main menu. |
TFLogoImage | Team Fortress 2 Logo Image |
TFCharacterImage | Image of a random TF2 class. Usually dressed up for events (such as Halloween). |
MainMenuBGPanel | Background image for the menu buttons |
PlayLabel | Label that says "Play" |
TooltipPanel | The tool tip panel is displayed when hovering over a button that has a tool tip. This control defines the style of the tooltip. |
CreateServerButton | Button to start a local game |
MOTD_ShowButtonPanel | Button to open the news |
MOTD_Panel | The news panel - defines the style and layout of the entire news panel |
Notifications_ShowButtonPanel | Show notifications button |
Notifications_Panel | Notifications panel (such as new items) |
HTMLContainer | |
TrainingButton | Button to Start Training mode |
SteamWorkshopButton | Button to open Steam Workshop |
VRModeButton | |
ReplayBrowserButton | Button to Open Replay Browser |
GeneralStoreButton | Button to Open the Store |
StoreHasNewItemsImage | Image that is shown when the store has new items |
CharacterSetupButton | Button to Open Loadout |
StoreBGPanel | Another button background image like MainMenuBGPanel |
CustomizeLabel | Label that says "Customise" |
CreateBGPanel | Another button background image like MainMenuBGPanel |
CreateLabel | Label that says "Create" |
VRBGPanel | |
ShowPromoCodesButton | |
FreeTrialPanel | |
QuickplayButton | Button to open Quickplay dialog |
ResumeGameButton | Button to go back to a game. Shown when viewing the main menu while playing in a server. |
QuickplayChangeButton | |
PlayPVEButton | |
ServerBrowserButton | Button to Open the Server Browser |
ChangeServerButton | |
CallVoteButton | Button to Start a Server Vote. Shown when viewing the main menu while playing in a server. |
MutePlayersButton | Button to Mute Players in current Server. Shown when viewing the main menu while playing in a server. |
RequestCoachButton | Button to Request a Coach come help you play in a server. |
BackgroundFooter | |
FooterLine | |
NewUserForumsButton | |
AchievementsButton | Button to Open Steam Achievenments dialog |
CommentaryButton | |
CoachPlayersButton | |
ReportBugButton | |
TF2SettingsButton | Button to Open TF2 Settings dialog |
SettingsButton | Button to Open Source Engine Settings dialog |
QuitButton | Button to quit TF2 |
DisconnectButton | Button to Disconnect from the current server |
BackToReplaysButton | |
TutorialHighlight | |
PracticeHighlight | |
NewUserForumHighlight | |
OptionsHighlightPanel | |
LoadoutHighlightPanel | |
StoreHighlightPanel |