2 CLASS(NexuizMutatorsDialog) EXTENDS(NexuizDialog)
3 METHOD(NexuizMutatorsDialog, toString, string(entity))
4 METHOD(NexuizMutatorsDialog, fill, void(entity))
5 METHOD(NexuizMutatorsDialog, showNotify, void(entity))
6 METHOD(NexuizMutatorsDialog, close, void(entity))
7 ATTRIB(NexuizMutatorsDialog, title, string, "Mutators")
8 ATTRIB(NexuizMutatorsDialog, color, vector, SKINCOLOR_DIALOG_MUTATORS)
9 ATTRIB(NexuizMutatorsDialog, intendedWidth, float, 0.6)
10 ATTRIB(NexuizMutatorsDialog, rows, float, 9)
11 ATTRIB(NexuizMutatorsDialog, columns, float, 4)
12 ATTRIB(NexuizMutatorsDialog, refilterEntity, entity, NULL)
13 ENDCLASS(NexuizMutatorsDialog)
17 void showNotifyNexuizMutatorsDialog(entity me)
21 string toStringNexuizMutatorsDialog(entity me)
25 if(cvar("g_minstagib"))
26 s = strcat(s, ", MinstaGib");
28 s = strcat(s, ", NixNex");
29 if(cvar("g_rocketarena"))
30 s = strcat(s, ", RL arena");
31 if(cvar("sv_gravity") < 800)
32 s = strcat(s, ", Low gravity");
34 s = strcat(s, ", Cloaked");
35 if(cvar("g_footsteps"))
36 s = strcat(s, ", Steps");
37 if(cvar("g_grappling_hook"))
38 s = strcat(s, ", Hook");
39 if(cvar("g_laserguided_missile"))
40 s = strcat(s, ", LG missiles");
42 s = strcat(s, ", Midair");
44 s = strcat(s, ", Vampire");
48 return substring(s, 2, strlen(s) - 2);
50 void fillNexuizMutatorsDialog(entity me)
54 me.TD(me, 1, 2, makeNexuizTextLabel(0, "Game mutators:"));
56 me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_cloaked", "Cloaked"));
58 me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_footsteps", "Footsteps"));
60 me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_grappling_hook", "Grappling hook"));
62 me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_laserguided_missile", "Laser guided missiles"));
64 me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_midair", "Midair"));
66 me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_vampire", "Vampire"));
68 me.gotoRC(me, 0, 2); me.setFirstColumn(me, me.currentColumn);
69 me.TD(me, 1, 2, makeNexuizTextLabel(0, "Arena mutators:"));
71 me.TD(me, 1, 2, e = makeNexuizRadioButton(1, string_null, string_null, "Regular"));
73 me.TD(me, 1, 2, e = makeNexuizRadioButton(1, "g_minstagib", string_null, "MinstaGib"));
75 me.TD(me, 1, 2, e = makeNexuizRadioButton(1, "g_nixnex", string_null, "NixNex"));
78 me.TD(me, 1, 1.8, e = makeNexuizCheckBox(1, "g_nixnex_with_laser", "with laser"));
79 setDependent(e, "g_nixnex", 1, 1);
81 me.TD(me, 1, 2, e = makeNexuizRadioButton(1, "g_rocketarena", string_null, "Rocket launcher arena"));
83 me.gotoRC(me, me.rows - 2, 0);
84 s = makeNexuizSlider(80, 400, 8, "sv_gravity");
86 s.valueDisplayMultiplier = 0.125; // show gravity in percent
87 me.TD(me, 1, 1, e = makeNexuizSliderCheckBox(800, 1, s, "Low gravity"));
88 e.savedValue = 200; // good on silvercity
91 me.gotoRC(me, me.rows - 1, 0);
92 me.TD(me, 1, me.columns, e = makeNexuizButton("OK", '0 0 0'));
93 e.onClick = Dialog_Close;
97 void closeNexuizMutatorsDialog(entity me)
100 me.refilterEntity.refilter(me.refilterEntity);