2 CLASS(NexuizModButton) EXTENDS(NexuizButton)
3 METHOD(NexuizModButton, configureNexuizModButton, void(entity, string))
4 ATTRIB(NexuizModButton, destination, string, string_null)
5 ENDCLASS(NexuizModButton)
6 entity makeNexuizModButton(string menu);
7 void NexuizModButton_Click(entity me, entity other);
11 entity makeNexuizModButton(string menu)
14 me = spawnNexuizModButton();
15 me.configureNexuizModButton(me, menu);
19 void NexuizModButton_Click(entity me, entity other)
22 thecmd = strcat("\nmenu_restart");
24 if (me.destination != "")
25 thecmd = strcat(thecmd, "\ntogglemenu\ndefer 0.1 \"menu_cmd directmenu ", me.destination,"\"\n");
27 if (cvar_string("menu_slist_modfilter") == "havoc")
28 thecmd = strcat("\ngamedir data", thecmd);
30 thecmd = strcat("\ngamedir havoc", thecmd);
34 void configureNexuizModButtonNexuizModButton(entity me, string menu)
36 me.configureNexuizButton(me, "", '0 0 0');
37 me.onClick = NexuizModButton_Click;
38 me.onClickEntity = me;
39 me.destination = menu;
41 if (cvar_string("menu_slist_modfilter") == "havoc")
42 me.text = "Switch to Nexuiz mode";
44 me.text = "Switch to Havoc mode";