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

ControlWhat 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.
BackgroundBackground image of the main menu.
TFLogoImageTeam Fortress 2 Logo Image
TFCharacterImageImage of a random TF2 class. Usually dressed up for events (such as Halloween).
MainMenuBGPanelBackground image for the menu buttons
PlayLabelLabel that says "Play"
TooltipPanelThe tool tip panel is displayed when hovering over a button that has a tool tip. This control defines the style of the tooltip.
CreateServerButtonButton to start a local game
MOTD_ShowButtonPanelButton to open the news
MOTD_PanelThe news panel - defines the style and layout of the entire news panel
Notifications_ShowButtonPanelShow notifications button
Notifications_PanelNotifications panel (such as new items)
HTMLContainer
TrainingButtonButton to Start Training mode
SteamWorkshopButtonButton to open Steam Workshop
VRModeButton
ReplayBrowserButtonButton to Open Replay Browser
GeneralStoreButtonButton to Open the Store
StoreHasNewItemsImageImage that is shown when the store has new items
CharacterSetupButtonButton to Open Loadout
StoreBGPanelAnother button background image like MainMenuBGPanel
CustomizeLabelLabel that says "Customise"
CreateBGPanelAnother button background image like MainMenuBGPanel
CreateLabelLabel that says "Create"
VRBGPanel
ShowPromoCodesButton
FreeTrialPanel
QuickplayButtonButton to open Quickplay dialog
ResumeGameButtonButton to go back to a game. Shown when viewing the main menu while playing in a server.
QuickplayChangeButton
PlayPVEButton
ServerBrowserButtonButton to Open the Server Browser
ChangeServerButton
CallVoteButtonButton to Start a Server Vote. Shown when viewing the main menu while playing in a server.
MutePlayersButtonButton to Mute Players in current Server. Shown when viewing the main menu while playing in a server.
RequestCoachButtonButton to Request a Coach come help you play in a server.
BackgroundFooter
FooterLine
NewUserForumsButton
AchievementsButtonButton to Open Steam Achievenments dialog
CommentaryButton
CoachPlayersButton
ReportBugButton
TF2SettingsButtonButton to Open TF2 Settings dialog
SettingsButtonButton to Open Source Engine Settings dialog
QuitButtonButton to quit TF2
DisconnectButtonButton to Disconnect from the current server
BackToReplaysButton
TutorialHighlight
PracticeHighlight
NewUserForumHighlight
OptionsHighlightPanel
LoadoutHighlightPanel
StoreHighlightPanel