From: terencehill Date: Thu, 16 Dec 2010 00:23:51 +0000 (+0100) Subject: hud_panel_physics 1 = show only when spectating other players, 2 = show always X-Git-Tag: xonotic-v0.5.0~352 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b80e3606468c73aac882759154271cc9c00efda6;p=xonotic%2Fxonotic-data.pk3dir.git hud_panel_physics 1 = show only when spectating other players, 2 = show always Just like the pressed keys panel --- diff --git a/_hud_descriptions.cfg b/_hud_descriptions.cfg index 067578823..f9456f81d 100644 --- a/_hud_descriptions.cfg +++ b/_hud_descriptions.cfg @@ -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" diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 454132c2a..ed7c4858e 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -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; diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_physics.c b/qcsrc/menu/xonotic/dialog_hudpanel_physics.c index e00524167..4ca6144f8 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_physics.c +++ b/qcsrc/menu/xonotic/dialog_hudpanel_physics.c @@ -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"))));