me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
me.TD(me, 1, 3, e = makeXonoticRadioButton(3, "crosshair_enabled", "0", _("No crosshair")));
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticRadioButton(3, "crosshair_per_weapon", "1", _("Per weapon crosshair")));
+ me.TD(me, 1, 3, e = makeXonoticRadioButton(3, "crosshair_per_weapon", string_null, _("Per weapon crosshair")));
makeMulti(e, "crosshair_enabled");
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticRadioButton(3, "crosshair_enabled", "2", _("Custom crosshair")));
me.TR(me);
me.TDempty(me, 0.1);
- for(i = 1; i <= 10; ++i) {
- me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(4, i), '1 1 0');
+ for(i = 1; i <= 14; ++i) {
+ me.TDNoMargin(me, 1, 2 / 14, e = makeXonoticCrosshairButton(4, i), '1 1 0');
setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2);
}
// show a larger preview of the selected crosshair
setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2);
me.TR(me);
me.TDempty(me, 0.1);
- for(i = 11; i <= 20; ++i) {
- me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(4, i), '1 1 0');
- setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2);
- }
- me.TR(me);
- me.TDempty(me, 0.1);
- for(i = 21; i <= 30; ++i) {
- me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(4, i), '1 1 0');
+ for(i = 15; i <= 28; ++i) {
+ me.TDNoMargin(me, 1, 2 / 14, e = makeXonoticCrosshairButton(4, i), '1 1 0');
setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2);
}
me.TR(me);
me.TR(me);
me.TDempty(me, 0.5);
me.TD(me, 1, 2, e = makeXonoticButton(_("HUD settings"), '0 0 0'));
+ if not(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))
+ {
+ e.onClick = DialogOpenButton_Click;
+ e.onClickEntity = main.weaponsDialog;
+ }
+ else
+ {
e.onClick = HUDSetup_Join_Click;
e.onClickEntity = me;
+ }
// TODO: show hud config name with text here
me.gotoRC(me, me.rows - 1, 0);
}
void HUDSetup_Join_Click(entity me, entity btn)
{
- if(! (gamestatus & (GAME_CONNECTED | GAME_ISSERVER)))
+ if not(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))
{
localcmd("map hudsetup/hudsetup", "\n");
}
METHOD(XonoticViewDialog, showNotify, void(entity))
ATTRIB(XonoticViewDialog, title, string, _("View settings"))
ATTRIB(XonoticViewDialog, color, vector, SKINCOLOR_DIALOG_VIEW)
- ATTRIB(XonoticViewDialog, intendedWidth, float, 0.6)
- ATTRIB(XonoticViewDialog, rows, float, 10)
- ATTRIB(XonoticViewDialog, columns, float, 3)
+ ATTRIB(XonoticViewDialog, intendedWidth, float, 0.9)
+ ATTRIB(XonoticViewDialog, rows, float, 13)
+ ATTRIB(XonoticViewDialog, columns, float, 6.2) // added extra .2 for center space
ENDCLASS(XonoticViewDialog)
#endif
}
void XonoticViewDialog_fill(entity me)
{
- entity e;
-
+ entity e, sl;
+ float i;
+
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Field of view:")));
+ me.TD(me, 1, 2, e = makeXonoticSlider(60, 130, 5, "fov"));
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Zoom:")));
+ me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_reticle"));
+ e.addValue(e, _("Fullscreen"), "0");
+ e.addValue(e, _("With reticle"), "1");
+ e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Factor:")));
+ me.TD(me, 1, 2, e = makeXonoticSlider(2, 16, 0.5, "cl_zoomfactor"));
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_hidewaypoints", _("Show base waypoints")));
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Speed:")));
+ me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_zoomspeed"));
+ e.addValue(e, "1", "1"); // Samual: for() loop doesn't work here, even though it would make sense.
+ e.addValue(e, "2", "2");
+ e.addValue(e, "3", "3");
+ e.addValue(e, "4", "4");
+ e.addValue(e, "5", "5");
+ e.addValue(e, "6", "6");
+ e.addValue(e, "7", "7");
+ e.addValue(e, "8", "8");
+ e.addValue(e, _("Instant"), "-1");
+ e.configureXonoticTextSliderValues(e);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Waypoint scale:")));
- me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 1.5, 0.05, "g_waypointsprite_scale"));
- setDependent(e, "cl_hidewaypoints", 0, 0);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Sensitivity:")));
+ me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.1, "cl_zoomsensitivity"));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Waypoint alpha:")));
- me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1, 0.05, "g_waypointsprite_alpha"));
- setDependent(e, "cl_hidewaypoints", 0, 0);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "hud_shownames", _("Show names above players")));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Velocity zoom:")));
+ me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_velocityzoom_type"));
+ e.addValue(e, _("Disabled"), "0");
+ e.addValue(e, _("Forward only"), "3");
+ e.addValue(e, _("All directions"), "1");
+ e.configureXonoticTextSliderValues(e);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_weaponpriority_useforcycling", _("Use priority list for weapon cycling")));
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Speed")));
+ me.TD(me, 1, 2, e = makeXonoticSlider(-1, 1, 0.2, "cl_velocityzoom"));
+ setDependent(e, "cl_velocityzoom_type", 1, 3);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_autoswitch", _("Auto switch weapons on pickup")));
+
+ me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
+ me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "0", _("1st person perspective")));
+ makeMulti(e, "crosshair_hittest_showimpact");
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "r_drawviewmodel", _("Draw 1st person weapon model")));
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.05, 0, "cl_bobfall", _("Smooth the view when landing from a jump")));
+ setDependent(e, "chase_active", -1, 0);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "4", _("Left align")));
- setDependent(e, "r_drawviewmodel", 1, 1);
- me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "1", _("Center")));
- setDependent(e, "r_drawviewmodel", 1, 1);
- me.TD(me, 1, 1.0, e = makeXonoticRadioButton(1, "cl_gunalign", "3", _("Right align")));
- setDependent(e, "r_drawviewmodel", 1, 1);
-
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.05, 0, "cl_smoothviewheight", _("Smooth the view while crouching")));
+ setDependent(e, "chase_active", -1, 0);
+ me.TR(me);
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "1", _("3rd person perspective")));
+ makeMulti(e, "crosshair_hittest_showimpact");
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Back distance")));
+ setDependent(e, "chase_active", 1, 1);
+ me.TD(me, 1, 2, e = makeXonoticSlider(10, 100, 1, "chase_back"));
+ setDependent(e, "chase_active", 1, 1);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Up distance")));
+ setDependent(e, "chase_active", 1, 1);
+ me.TD(me, 1, 2, e = makeXonoticSlider(10, 50, 1, "chase_up"));
+ setDependent(e, "chase_active", 1, 1);
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_clippedspectating", _("Allow passing through walls while spectating")));
+
me.gotoRC(me, me.rows - 1, 0);
me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
e.onClick = Dialog_Close;
}
}
me.TR(me);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBox(1, "mod_q3bsp_nolightmaps", _("Use lightmaps")));
- me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "r_glsl_deluxemapping", _("Deluxe mapping")));
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(1, "mod_q3bsp_nolightmaps", _("Use lightmaps")));
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_glsl_deluxemapping", _("Deluxe mapping")));
setDependentAND(e, "vid_gl20", 1, 1, "mod_q3bsp_nolightmaps", 0, 0);
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_gloss", _("Gloss")));
+ setDependentAND3(e, "vid_gl20", 1, 1, "mod_q3bsp_nolightmaps", 0, 0, "r_glsl_deluxemapping", 1, 1);
me.TR(me);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Particles quality:")));
if(cvar("developer"))
me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(3, 0, "r_showsurfaces", _("Show surfaces")));
me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "r_bloom", _("Bloom (High Dynamic Range/HDR)")));
- me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_gloss", _("Gloss")));
- setDependent(e, "vid_gl20", 1, 1);
- me.TR(me);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping", _("Offset mapping")));
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping", _("Offset mapping")));
setDependent(e, "vid_gl20", 1, 1);
- me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping_reliefmapping", _("Relief mapping")));
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping_reliefmapping", _("Relief mapping")));
+ setDependentAND(e, "vid_gl20", 1, 1, "r_glsl_offsetmapping", 1, 1);
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping_lod", _("LOD")));
setDependentAND(e, "vid_gl20", 1, 1, "r_glsl_offsetmapping", 1, 1);
+ me.TR(me);
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "r_bloom", _("Bloom (High Dynamic Range/HDR)")));
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_water", _("Reflections:")));
setDependent(e, "vid_gl20", 1, 1);
e.configureXonoticTextSliderValues(e);
setDependentAND(e, "vid_gl20", 1, 1, "r_water", 1, 1);
me.TR(me);
- s = makeXonoticTextSlider("r_motionblur");
- s.addValue(s, _("Disabled"), "0");
- s.addValue(s, _("Subtle"), "0.2");
- s.addValue(s, _("Low"), "0.4");
- s.addValue(s, _("Medium"), "0.5");
- s.addValue(s, _("High"), "0.7");
- s.addValue(s, _("Very high"), "1");
- s.configureXonoticTextSliderValues(s);
- //setDependent(s, "r_motionblur", 0.01, 1);
+ s = makeXonoticSlider(0.1, 1, 0.1, "r_motionblur");
me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, s, _("Motion blur:")));
- //if(s.value != e.savedValue)
- // e.savedValue = 0.5; // default
+ if(s.value != e.savedValue)
+ e.savedValue = 0.5; // default
me.TD(me, 1, 2, s);
me.TR(me);
e = makeXonoticCheckBoxEx(0.5, 0, "hud_postprocessing_maxbluralpha", _("Extra postprocessing effects"));