GameMenu.res: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with 'GameMenu.res is a RES file that is located inside the resource/ folder of the game / mod. It is the file that controls the menu buttons that will appear in the in-game menu. …')
 
mNo edit summary
Line 16: Line 16:
"label" "#GameUI_GameMenu_NewGame"
"label" "#GameUI_GameMenu_NewGame"
"command" "OpenNewGameDialog"
"command" "OpenNewGameDialog"
"notmulti" "1"
"notmulti" "1" //nomultie will make this button not appear when in MP mode
}
}
"6"
"6"

Revision as of 18:07, 12 July 2009

GameMenu.res is a RES file that is located inside the resource/ folder of the game / mod. It is the file that controls the menu buttons that will appear in the in-game menu. Mods can use this for adding new command buttons to their main menu.

They are simply a text document saved with a .res extension inside the resource/ folder. Example syntax (from HL2):

"GameMenu"
{
	"1"
	{
		"label" "#GameUI_GameMenu_ResumeGame"
		"command" "ResumeGame"
		"OnlyInGame" "1"
	}
	"5"
	{
		"label" "#GameUI_GameMenu_NewGame"
		"command" "OpenNewGameDialog"
		"notmulti" "1"  //nomultie will make this button not appear when in MP mode
	}
	"6"
	{
		"label" "#GameUI_GameMenu_LoadGame"
		"command" "OpenLoadGameDialog"
		"notmulti" "1"
	}
	"7"
	{
		"label" "#GameUI_GameMenu_SaveGame"
		"command" "OpenSaveGameDialog"
		"notmulti" "1"
		"OnlyInGame" "1"
	}
	"11"
	{
		"label" "#GameUI_GameMenu_Friends"
		"command" "OpenFriendsDialog"
	}
	"12"
	{
		"label" "#GameUI_GameMenu_Options"
		"command" "OpenOptionsDialog"
	}
	"13"
	{
		"label" "#GameUI_GameMenu_Quit"
		"command" "Quit"
	}
}