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_instagib"))
26 s = strcat(s, ", InstaGib");
27 if(cvar("g_minstagib"))
28 s = strcat(s, ", MinstaGib");
30 s = strcat(s, ", NixNex");
31 if(cvar("g_rocketarena"))
32 s = strcat(s, ", RL arena");
33 if(cvar("sv_gravity") < 800)
34 s = strcat(s, ", Low gravity");
36 s = strcat(s, ", Cloaked");
37 if(cvar("g_footsteps"))
38 s = strcat(s, ", Steps");
39 if(cvar("g_grappling_hook"))
40 s = strcat(s, ", Hook");
41 if(cvar("g_laserguided_missile"))
42 s = strcat(s, ", LG missiles");
44 s = strcat(s, ", Mid-air");
46 s = strcat(s, ", Vampire");
50 return substring(s, 2, strlen(s) - 2);
52 void fillNexuizMutatorsDialog(entity me)
56 me.TD(me, 1, 2, makeNexuizTextLabel(0, "Game mutators:"));
58 me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_cloaked", "Cloaked"));
60 me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_footsteps", "Foot steps"));
62 me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_grappling_hook", "Grappling hook"));
64 me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_laserguided_missile", "Laser guided missiles"));
66 me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_midair", "Mid-air"));
68 me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_vampire", "Vampire"));
70 me.gotoRC(me, 0, 2); me.setFirstColumn(me, me.currentColumn);
71 me.TD(me, 1, 2, makeNexuizTextLabel(0, "Arena mutators:"));
73 me.TD(me, 1, 2, e = makeNexuizRadioButton(1, string_null, string_null, "Regular"));
75 me.TD(me, 1, 2, e = makeNexuizRadioButton(1, "g_instagib", string_null, "InstaGib"));
77 me.TD(me, 1, 2, e = makeNexuizRadioButton(1, "g_minstagib", string_null, "MinstaGib"));
79 me.TD(me, 1, 2, e = makeNexuizRadioButton(1, "g_nixnex", string_null, "NixNex"));
82 me.TD(me, 1, 1.8, e = makeNexuizCheckBox(1, "g_nixnex_with_laser", "with laser"));
83 setDependent(e, "g_nixnex", 1, 1);
85 me.TD(me, 1, 2, e = makeNexuizRadioButton(1, "g_rocketarena", string_null, "Rocket launcher arena"));
87 me.gotoRC(me, me.rows - 2, 0);
88 s = makeNexuizSlider(80, 400, 8, "sv_gravity");
90 s.valueDisplayMultiplier = 0.125; // show gravity in percent
91 me.TD(me, 1, 1, e = makeNexuizSliderCheckBox(800, 1, s, "Low gravity"));
92 e.savedValue = 200; // good on silvercity
95 me.gotoRC(me, me.rows - 1, 0);
96 me.TD(me, 1, me.columns, e = makeNexuizButton("OK", '0 0 0'));
97 e.onClick = Dialog_Close;
101 void closeNexuizMutatorsDialog(entity me)
103 if(me.refilterEntity)
104 me.refilterEntity.refilter(me.refilterEntity);