]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/dialog_settings_game_hud.qc
Remove an useless setting
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_settings_game_hud.qc
index 2c4903b0d99fb1ae79cfdba143f8fb0941fe73c3..8959c6a69d374b20f56627735c64f0516e7f1a6c 100644 (file)
@@ -1,21 +1,13 @@
-#ifndef DIALOG_SETTINGS_GAME_HUD_H
-#define DIALOG_SETTINGS_GAME_HUD_H
-#include "tab.qc"
-CLASS(XonoticGameHUDSettingsTab, XonoticTab)
-       METHOD(XonoticGameHUDSettingsTab, fill, void(entity));
-       METHOD(XonoticGameHUDSettingsTab, showNotify, void(entity));
-       ATTRIB(XonoticGameHUDSettingsTab, title, string, _("HUD"))
-       ATTRIB(XonoticGameHUDSettingsTab, intendedWidth, float, 0.9)
-       ATTRIB(XonoticGameHUDSettingsTab, rows, float, 13)
-       ATTRIB(XonoticGameHUDSettingsTab, columns, float, 6.2)
-ENDCLASS(XonoticGameHUDSettingsTab)
-entity makeXonoticGameHUDSettingsTab();
-void HUDSetup_Start(entity me, entity btn);
-#include "../gamesettings.qh"
-REGISTER_SETTINGS(HUD, makeXonoticGameHUDSettingsTab());
-#endif
+#include "dialog_settings_game_hud.qh"
+
+#include "../item/modalcontroller.qh"
+#include "mainwindow.qh"
+#include "textlabel.qh"
+#include "slider.qh"
+#include "slider_sbfadetime.qh"
+#include "checkbox.qh"
+#include "button.qh"
 
-#ifdef IMPLEMENTATION
 void HUDSetup_Check_Gamestatus(entity me, entity btn)
 {
        if(!(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))) // we're not in a match, ask the player if they want to start one anyway
@@ -47,36 +39,38 @@ void XonoticGameHUDSettingsTab_fill(entity me)
        // threshold: hud_damage_pain_threshold_lower_health
        // scoreboard_alpha*
 
-       //me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Scoreboard")));
-       //me.TR(me);
-       //      me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Alpha:")));
-       //      me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.05, "scoreboard_alpha_bg"));
+       me.TR(me);
+       me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Alpha:")));
+       me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.05, "hud_panel_scoreboard_bg_alpha"));
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Fading speed:")));
                me.TD(me, 1, 2, e = makeXonoticScoreboardFadeTimeSlider());
        me.TR(me);
-               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Side padding:")));
-               me.TD(me, 1, 2, e = makeXonoticSlider(0.05, 0.3, 0.01, "scoreboard_offset_left"));
-                       makeMulti(e, "scoreboard_offset_right");
-
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_scoreboard_table_highlight", _("Enable rows / columns highlighting")));
        me.TR(me);
-       //me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "scoreboard_respawntime_decimals", _("Show decimals in respawn countdown")));
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_scoreboard_accuracy", _("Show accuracy underneath scoreboard")));
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "scoreboard_accuracy", _("Show accuracy underneath scoreboard")));
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Show team sizes:")));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider_T("hud_panel_scoreboard_team_size_position", _("Team size position: Off=do not show; Left=on the left side of the scoreboard and move team scores to the right; Right=on the right of the scoreboard")));
+                       e.addValue(e, _("Left"), "1");
+                       e.addValue(e, _("Off"), "0");
+                       e.addValue(e, _("Right"), "2");
+                       e.configureXonoticTextSliderValues(e);
 
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Waypoints")));
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_hidewaypoints", _("Display waypoint markers for objectives on the map")));
+               me.TD(me, 1, 3, e = makeXonoticCheckBox_T(1, "cl_hidewaypoints", _("Display waypoint markers for objectives on the map"),
+                       _("Show various gametype specific waypoints")));
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Alpha:")));
                        setDependent(e, "cl_hidewaypoints", 0, 0);
-               me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1, 0.05, "g_waypointsprite_alpha"));
+               me.TD(me, 1, 2, e = makeXonoticSlider_T(0.1, 1, 0.05, "g_waypointsprite_alpha",
+                       _("Control transparency of the waypoints")));
                        setDependent(e, "cl_hidewaypoints", 0, 0);
        me.TR(me);
                me.TDempty(me, 0.2);
@@ -88,15 +82,18 @@ void XonoticGameHUDSettingsTab_fill(entity me)
                me.TDempty(me, 0.2);
                me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Edge offset:")));
                        setDependent(e, "cl_hidewaypoints", 0, 0);
-               me.TD(me, 1, 2, e = makeXonoticSlider(0, 0.3, 0.01, "g_waypointsprite_edgeoffset_bottom"));
+               me.TD(me, 1, 2, e = makeXonoticSlider_T(0, 0.3, 0.01, "g_waypointsprite_edgeoffset_bottom", "-"));
                        makeMulti(e, "g_waypointsprite_edgeoffset_top g_waypointsprite_edgeoffset_left g_waypointsprite_edgeoffset_right");
                        setDependent(e, "cl_hidewaypoints", 0, 0);
 
        me.TR(me);
-       //me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.25, 1, "g_waypointsprite_crosshairfadealpha", _("Fade when near the crosshair")));
                        setDependent(e, "cl_hidewaypoints", 0, 0);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "g_waypointsprite_text", _("Display names instead of icons")));
+                       setDependent(e, "cl_hidewaypoints", 0, 0);
 
        #if 0
        me.TR(me);
@@ -165,6 +162,11 @@ void XonoticGameHUDSettingsTab_fill(entity me)
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Damage overlay:")));
                me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.05, "hud_damage"));
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "hud_dynamic_follow", _("Dynamic HUD"),
+                       _("HUD moves around following player's movement")));
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_dynamic_shake", _("Shake the HUD when hurt")));
        me.TR(me);
        me.TR(me);
                me.TDempty(me, 0.5);
@@ -173,4 +175,3 @@ void XonoticGameHUDSettingsTab_fill(entity me)
                        e.onClickEntity = me;
                // TODO: show hud config name with text here
 }
-#endif