MenuFile Asset

From COD Engine Research
Jump to: navigation, search

The menufile is often mistaken for the menu asset. The menufile is actually a list of menu assets. This asset exists in all Call of Duty's after the Call of Duty 4 Alpha and has never changed.

struct MenuList
{
  const char *name;
  int menuCount;
  menuDef_t **menus;
};

Source Format

Menu files are kept in "raw/ui_mp", for multiplayer, or "raw/ui", for singleplayer. The source format is very similar to the menu asset source format. It uses the keyword "loadMenu", which tells the compiler which menu to compile. The compiler just compiles each menu file, then gets added to the MenuList structure above. For example, the code.txt menufile from cod4:

// code menu defs
//
{
	loadMenu { "ui/error.menu" }
	loadMenu { "ui_mp/connect.menu" }
}