]> icculus.org git repositories - divverent/nexuiz.git/blob - scmenu/source/system/isframe.qh
Adding my current version of the scmenu to the nexuiz cvs.
[divverent/nexuiz.git] / scmenu / source / system / isframe.qh
1 // DP/Nex Menu
2 // system/isframe.qh
3
4 // define these menus in the menu def files or dont
5 // if not defined there will be added default items
6 const string MENU_NORMAL_NAME = "Normal";
7 const string MENU_INGAME_NAME = "Ingame";
8
9 const string MENU_NORMAL_DEFAULT =
10 "// default normal menu\n"
11 "{\n"
12 "       \"type\"        \"Item_Window\"\n"
13 "       \"name\"        \"Normal\"\n"
14 "}";
15
16 const string MENU_INGAME_DEFAULT =
17 "// default ingame menu\n"
18 "{\n"
19 "       \"type\"        \"Item_Window\"\n"
20 "       \"name\"                \"Ingame\"\n"
21 "}";
22
23 // insert the files here
24 var string MENU_MAINFILE = "menu/menu";
25
26 const bool MENU_ALLOWINGAME = false;
27
28 ///////////////
29 // prototypes
30 ///
31
32 // used for global managing
33 void() Menu_Init;
34 // loads all files the file lists consists of
35 void() Menu_Load;
36 // used to reset the menu states everytime the menu is activated
37 void() Menu_PerformReinit;
38 // called when the hide event is processed
39 void() Menu_Hide;
40 // unload the menu
41 void() Menu_Shutdown;
42
43 // For runtime addition of items, there is one function:
44 // it supposes that the Item has already been embedded into its parent
45 void( entity pItem ) Menu_LinkItem; // does also link all children and call their spawn function if necessary
46 void( entity pWindow ) Menu_LinkWindow;
47
48  // to make life easier
49 entity( string pType, string pName, string pParent ) Menu_CreateItem;
50 entity( entity pTemplate, string pName, string pParent, bool pTree ) Menu_DeriveItem;
51
52 void( entity pItem, string pData ) Menu_AddEntityData;
53
54 // these functions are pretty private, so dont call them !
55 void( entity pParent ) Menu_LinkChildren;
56 void() Menu_LinkWindows;