]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
hud_panel_physics 1 = show only when spectating other players, 2 = show always
authorterencehill <piuntn@gmail.com>
Thu, 16 Dec 2010 00:23:51 +0000 (01:23 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 16 Dec 2010 00:23:51 +0000 (01:23 +0100)
Just like the pressed keys panel

_hud_descriptions.cfg
qcsrc/client/hud.qc
qcsrc/menu/xonotic/dialog_hudpanel_physics.c

index 0675788238109e9f505556ea6f9c82237e079b58..f9456f81d5c00594b2121b4258253539fea3b60f 100644 (file)
@@ -217,7 +217,7 @@ seta hud_panel_infomessages_bg_border "" "if set to something else than \"\" = o
 seta hud_panel_infomessages_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
 seta hud_panel_infomessages_flip "" "1 = align the items to the right"
 
-seta hud_panel_physics "" "enable/disable this panel
+seta hud_panel_physics "" "enable/disable this panel, 1 = show only when spectating other players, 2 = show always"
 seta hud_panel_physics_pos "" "position of this base of the panel"
 seta hud_panel_physics_size "" "size of this panel"
 seta hud_panel_physics_bg "" "if set to something else than \"\" = override default background"
index 454132c2ab9f1eca0d046992de251867ad79cd2e..ed7c4858e205bb20242443885f6f6786758b97f3 100644 (file)
@@ -5173,6 +5173,7 @@ void HUD_Physics(void)
        if(!autocvar_hud_panel_physics)
        {
                if(!autocvar__hud_configure) return;
+               if(spectatee_status <= 0 && autocvar_hud_panel_physics < 2) return;
        }
        else
                hud_configure_active_panel = HUD_PANEL_PHYSICS;
index e00524167bd0c9d4ccf353e77d5a6ae990150910..4ca6144f808a243d954366c915e0fd1bf1084fc1 100644 (file)
@@ -19,7 +19,11 @@ void XonoticHUDPhysicsDialog_fill(entity me)
        float i;
 
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_physics", "Enable panel"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("hud_panel_physics"));
+                       e.addValue(e, "Panel disabled", "0");
+                       e.addValue(e, "Panel enabled when spectating", "1");
+                       e.addValue(e, "Panel always enabled", "2");
+                       e.configureXonoticTextSliderValues(e);
        me.TR(me);
                me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
                        me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));