2 CLASS(VoretPlayerSettingsTab) EXTENDS(VoretTab)
\r
3 METHOD(VoretPlayerSettingsTab, fill, void(entity))
\r
4 METHOD(VoretPlayerSettingsTab, draw, void(entity))
\r
5 ATTRIB(VoretPlayerSettingsTab, title, string, "Player Setup")
\r
6 ATTRIB(VoretPlayerSettingsTab, intendedWidth, float, 0.9)
\r
7 ATTRIB(VoretPlayerSettingsTab, rows, float, 22)
\r
8 ATTRIB(VoretPlayerSettingsTab, columns, float, 6.5)
\r
9 ATTRIB(VoretPlayerSettingsTab, playerNameLabel, entity, NULL)
\r
10 ATTRIB(VoretPlayerSettingsTab, playerNameLabelAlpha, float, 0)
\r
11 ENDCLASS(VoretPlayerSettingsTab)
\r
12 entity makeVoretPlayerSettingsTab();
\r
15 #ifdef IMPLEMENTATION
\r
16 entity makeVoretPlayerSettingsTab()
\r
19 me = spawnVoretPlayerSettingsTab();
\r
20 me.configureDialog(me);
\r
23 void drawVoretPlayerSettingsTab(entity me)
\r
25 if(cvar_string("_cl_name") == "Player")
\r
26 me.playerNameLabel.alpha = ((mod(time * 2, 2) < 1) ? 1 : 0);
\r
28 me.playerNameLabel.alpha = me.playerNameLabelAlpha;
\r
31 void fillVoretPlayerSettingsTab(entity me)
\r
33 entity e, pms, sl, label, box;
\r
37 me.TD(me, 1, 0.5, me.playerNameLabel = makeVoretTextLabel(0, "Name:"));
\r
38 me.playerNameLabelAlpha = me.playerNameLabel.alpha;
\r
39 me.TD(me, 1, 2.5, label = makeVoretTextLabel(0, string_null));
\r
41 label.allowColors = 1;
\r
44 me.TD(me, 1, 3.0, box = makeVoretInputBox(1, "_cl_name"));
\r
45 box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved
\r
47 label.textEntity = box;
\r
49 me.TD(me, 5, 1, e = makeVoretColorpicker(box));
\r
50 me.TD(me, 5, 2, e = makeVoretCharmap(box));
\r
57 me.gotoRC(me, 8, 0.0);
\r
59 m = me.rows - r - 2;
\r
60 n = 16 - !cvar("developer");
\r
62 for(i = 0; i < n; ++i)
\r
64 me.gotoRC(me, r + i * m, 0.1);
\r
65 me.TDNoMargin(me, m, 0.2, e = makeVoretColorButton(1, 0, i), '0 1 0');
\r
67 for(i = 0; i < n; ++i)
\r
69 me.gotoRC(me, r + i * m, 0.4);
\r
70 me.TDNoMargin(me, m, 0.2, e = makeVoretColorButton(2, 1, i), '0 1 0');
\r
72 me.gotoRC(me, 8, 0.6);
\r
73 pms = makeVoretPlayerModelSelector();
\r
74 me.TD(me, 1, 0.3, e = makeVoretButton("<<", '0 0 0'));
\r
75 e.onClick = PlayerModelSelector_Prev_Click;
\r
76 e.onClickEntity = pms;
\r
77 me.TD(me, me.rows - me.currentRow - 1, 1.8, pms);
\r
78 me.TD(me, 1, 0.3, e = makeVoretButton(">>", '0 0 0'));
\r
79 e.onClick = PlayerModelSelector_Next_Click;
\r
80 e.onClickEntity = pms;
\r
82 me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
\r
83 me.TD(me, 1, 1, e = makeVoretTextLabel(0, "Camera type:"));
\r
84 me.TD(me, 1, 1, e = makeVoretRadioButton(1, "chase_active", "0", "1st person"));
\r
85 me.TD(me, 1, 1, e = makeVoretRadioButton(1, "chase_active", "1", "3rd person"));
\r
87 me.TD(me, 1, 1, e = makeVoretTextLabel(0, "Field of View:"));
\r
88 me.TD(me, 1, 2, e = makeVoretSlider(60, 130, 1, "fov"));
\r
90 me.TD(me, 1, 1, e = makeVoretTextLabel(0, "Damage kick:"));
\r
91 me.TD(me, 1, 2, e = makeVoretSlider(0, 0.5, 0.05, "v_kicktime"));
\r
93 sl = makeVoretSlider(0.45, 0.75, 0.01, "cl_bobcycle");
\r
94 me.TD(me, 1, 1, e = makeVoretSliderCheckBox(0, 1, sl, "View bobbing:"));
\r
95 me.TD(me, 1, 2, sl);
\r
99 me.TD(me, 1, 1, e = makeVoretTextLabel(0, "Zoom Factor:"));
\r
100 me.TD(me, 1, 2, e = makeVoretSlider(2, 16, 0.5, "cl_zoomfactor"));
\r
102 sl = makeVoretSlider(1, 8, 0.5, "cl_zoomspeed");
\r
103 me.TD(me, 1, 1, e = makeVoretSliderCheckBox(-1, 1, sl, "Zoom speed:"));
\r
104 me.TD(me, 1, 2, sl);
\r
107 me.TDempty(me, 0.4);
\r
108 me.TD(me, 1, 2.2, e = makeVoretButton("Weapon & Crosshair settings...", '0 0 0'));
\r
109 e.onClick = DialogOpenButton_Click;
\r
110 e.onClickEntity = main.weaponsDialog;
\r
113 me.TDempty(me, 0.4);
\r
114 me.TD(me, 1, 2.2, e = makeVoretButton("Radar, HUD & Waypoints...", '0 0 0'));
\r
115 e.onClick = DialogOpenButton_Click;
\r
116 e.onClickEntity = main.radarDialog;
\r
117 me.TDempty(me, 0.5);
\r
119 #ifdef ALLOW_FORCEMODELS
\r
120 me.TD(me, 1, 1, e = makeVoretTextLabel(0, "Force Models:"));
\r
121 me.TD(me, 1, 2/3, e = makeVoretRadioButton(2, string_null, string_null, "None"));
\r
122 me.TD(me, 1, 2/3, e = makeVoretRadioButton(2, "cl_forceplayermodelsfromvoret", string_null, "Custom"));
\r
123 me.TD(me, 1, 2/3, e = makeVoretRadioButton(2, "cl_forceplayermodels", string_null, "All"));
\r
126 me.TD(me, 1, 3, e = makeVoretCheckBox(0, "cl_gentle", "Disable gore effects"));
\r
128 me.TD(me, 1, 1, e = makeVoretTextLabel(0, "Gibs:"));
\r
129 me.TD(me, 1, 2, e = makeVoretTextSlider("cl_nogibs"));
\r
130 e.addValue(e, "None", "1");
\r
131 e.addValue(e, "Few", "0.75");
\r
132 e.addValue(e, "Many", "0.5");
\r
133 e.addValue(e, "Lots", "0");
\r
134 e.configureVoretTextSliderValues(e);
\r
135 setDependent(e, "cl_gentle", 0, 0);
\r
138 me.gotoRC(me, me.rows - 1, 0);
\r
139 me.TD(me, 1, me.columns, makeVoretCommandButton("Apply immediately", '0 0 0', "color -1 -1;name \"$_cl_name\";cl_cmd sendcvar cl_weaponpriority;sendcvar cl_zoomfactor;sendcvar cl_zoomspeed;sendcvar cl_autoswitch;sendcvar cl_shownames;sendcvar cl_forceplayermodelsfromvoret;sendcvar cl_forceplayermodels", COMMANDBUTTON_APPLY));
\r