From cd55a11964724924f7838dc1a08faab6620fb5b4 Mon Sep 17 00:00:00 2001 From: FruitieX Date: Wed, 21 Jul 2010 15:03:29 +0300 Subject: [PATCH] allow turning on/off the healtharmor/powerups statusbars in a more clean way :) --- _hud_descriptions.cfg | 2 + hud_default.cfg | 4 + hud_luminos_default.cfg | 2 + hud_old_nexuiz.cfg | 4 +- qcsrc/client/autocvars.qh | 2 + qcsrc/client/hud.qc | 100 +++++++++++++----- .../xonotic/dialog_hudpanel_healtharmor.c | 7 ++ qcsrc/menu/xonotic/dialog_hudpanel_powerups.c | 7 ++ 8 files changed, 99 insertions(+), 29 deletions(-) diff --git a/_hud_descriptions.cfg b/_hud_descriptions.cfg index 7f15b0140..09860bbfa 100644 --- a/_hud_descriptions.cfg +++ b/_hud_descriptions.cfg @@ -70,6 +70,7 @@ seta hud_panel_powerups_bg_color_team "" "override panel color with team color i seta hud_panel_powerups_bg_alpha "" "if set to something else than \"\" = override default panel background alpha" seta hud_panel_powerups_bg_border "" "if set to something else than \"\" = override default size of border around the background" seta hud_panel_powerups_bg_padding "" "if set to something else than \"\" = override default padding of contents from border" +seta hud_panel_powerups_progressbar "" "enable progressbar in panel" seta hud_panel_healtharmor "" "enable/disable this panel, 2 = combined health/armor display" seta hud_panel_healtharmor_pos "" "position of this panel" @@ -83,6 +84,7 @@ seta hud_panel_healtharmor_bg_color_team "" "override panel color with team colo seta hud_panel_healtharmor_bg_alpha "" "if set to something else than \"\" = override default panel background alpha" seta hud_panel_healtharmor_bg_border "" "if set to something else than \"\" = override default size of border around the background" seta hud_panel_healtharmor_bg_padding "" "if set to something else than \"\" = override default padding of contents from border" +seta hud_panel_healtharmor_progressbar "" "enable progressbar in panel" seta hud_panel_notify "" "enable/disable this panel" seta hud_panel_notify_pos "" "position of this base of the panel" diff --git a/hud_default.cfg b/hud_default.cfg index 6d992d8bf..731a18741 100644 --- a/hud_default.cfg +++ b/hud_default.cfg @@ -68,6 +68,7 @@ seta hud_panel_powerups_bg_padding "" seta hud_panel_powerups_flip "1" seta hud_panel_powerups_iconalign "0" seta hud_panel_powerups_baralign "0" +seta hud_panel_powerups_progressbar "1" seta hud_panel_healtharmor 1 seta hud_panel_healtharmor_pos "0.305859 0.925606" @@ -81,6 +82,7 @@ seta hud_panel_healtharmor_bg_padding "" seta hud_panel_healtharmor_flip "0 seta hud_panel_healtharmor_iconalign "0" seta hud_panel_healtharmor_baralign "0" +seta hud_panel_healtharmor_progressbar "1" seta hud_panel_notify 1 seta hud_panel_notify_pos "0.663125 0.748536" @@ -196,3 +198,5 @@ seta hud_panel_infomessages_bg_color_team "" seta hud_panel_infomessages_bg_alpha "0" seta hud_panel_infomessages_bg_border "" seta hud_panel_infomessages_bg_padding "" + +menu_restart diff --git a/hud_luminos_default.cfg b/hud_luminos_default.cfg index 8ed8cc76a..731a18741 100644 --- a/hud_luminos_default.cfg +++ b/hud_luminos_default.cfg @@ -68,6 +68,7 @@ seta hud_panel_powerups_bg_padding "" seta hud_panel_powerups_flip "1" seta hud_panel_powerups_iconalign "0" seta hud_panel_powerups_baralign "0" +seta hud_panel_powerups_progressbar "1" seta hud_panel_healtharmor 1 seta hud_panel_healtharmor_pos "0.305859 0.925606" @@ -81,6 +82,7 @@ seta hud_panel_healtharmor_bg_padding "" seta hud_panel_healtharmor_flip "0 seta hud_panel_healtharmor_iconalign "0" seta hud_panel_healtharmor_baralign "0" +seta hud_panel_healtharmor_progressbar "1" seta hud_panel_notify 1 seta hud_panel_notify_pos "0.663125 0.748536" diff --git a/hud_old_nexuiz.cfg b/hud_old_nexuiz.cfg index d17e20aa6..e803ed9d3 100644 --- a/hud_old_nexuiz.cfg +++ b/hud_old_nexuiz.cfg @@ -12,7 +12,7 @@ seta hud_dock_color "0 0.5 0.35" seta hud_dock_color_team "0.700000" seta hud_dock_alpha "1" -seta hud_progressbar_alpha "0" +seta hud_progressbar_alpha "0.5" seta hud_progressbar_strength_color "0 0 0.6" seta hud_progressbar_shield_color "0.6 0 0.6" seta hud_progressbar_health_color "0.6 0 0" @@ -68,6 +68,7 @@ seta hud_panel_powerups_bg_padding "" seta hud_panel_powerups_flip "1" seta hud_panel_powerups_iconalign "0" seta hud_panel_powerups_baralign "0" +seta hud_panel_powerups_progressbar "0" seta hud_panel_healtharmor 1 seta hud_panel_healtharmor_pos "0.370000 0.930000" @@ -81,6 +82,7 @@ seta hud_panel_healtharmor_bg_padding "" seta hud_panel_healtharmor_flip "0 seta hud_panel_healtharmor_iconalign "0" seta hud_panel_healtharmor_baralign "0" +seta hud_panel_healtharmor_progressbar "0" seta hud_panel_notify 0 seta hud_panel_notify_pos "0 0.650000" diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index 5d91d6405..bfb60251d 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -100,6 +100,7 @@ var string autocvar_hud_panel_powerups_bg_padding; var float autocvar_hud_panel_powerups_flip; var float autocvar_hud_panel_powerups_iconalign; var float autocvar_hud_panel_powerups_baralign; +var float autocvar_hud_panel_powerups_progressbar; var float autocvar_hud_panel_healtharmor; var vector autocvar_hud_panel_healtharmor_pos; @@ -113,6 +114,7 @@ var string autocvar_hud_panel_healtharmor_bg_padding; var float autocvar_hud_panel_healtharmor_flip; var float autocvar_hud_panel_healtharmor_iconalign; var float autocvar_hud_panel_healtharmor_baralign; +var float autocvar_hud_panel_healtharmor_progressbar; var float autocvar_hud_panel_notify; var vector autocvar_hud_panel_notify_pos; diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 6ac09086f..d7b73fc78 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -487,11 +487,13 @@ void HUD_Panel_ExportCfg(string cfgname) fputs(fh, strcat("seta hud_panel_", panel_name, "_flip \"", cvar_string(strcat("hud_panel_", panel_name, "_flip")), "\"", "\n")); fputs(fh, strcat("seta hud_panel_", panel_name, "_iconalign \"", cvar_string(strcat("hud_panel_", panel_name, "_iconalign")), "\"", "\n")); fputs(fh, strcat("seta hud_panel_", panel_name, "_baralign \"", cvar_string(strcat("hud_panel_", panel_name, "_baralign")), "\"", "\n")); + fputs(fh, strcat("seta hud_panel_", panel_name, "_progressbar \"", cvar_string(strcat("hud_panel_", panel_name, "_progressbar")), "\"", "\n")); break; case HUD_PANEL_HEALTHARMOR: fputs(fh, strcat("seta hud_panel_", panel_name, "_flip \"", cvar_string(strcat("hud_panel_", panel_name, "_flip")), "\n")); fputs(fh, strcat("seta hud_panel_", panel_name, "_iconalign \"", cvar_string(strcat("hud_panel_", panel_name, "_iconalign")), "\"", "\n")); fputs(fh, strcat("seta hud_panel_", panel_name, "_baralign \"", cvar_string(strcat("hud_panel_", panel_name, "_baralign")), "\"", "\n")); + fputs(fh, strcat("seta hud_panel_", panel_name, "_progressbar \"", cvar_string(strcat("hud_panel_", panel_name, "_progressbar")), "\"", "\n")); break; case HUD_PANEL_NOTIFY: fputs(fh, strcat("seta hud_panel_", panel_name, "_flip \"", cvar_string(strcat("hud_panel_", panel_name, "_flip")), "\"", "\n")); @@ -1908,8 +1910,11 @@ void HUD_Powerups(void) { barsize = eX * 0.5 * mySize_x * min(1, leftcnt/30) + eY * mySize_y; } - HUD_Panel_GetProgressBarColor(leftname) - HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL); + if(autocvar_hud_panel_powerups_progressbar) + { + HUD_Panel_GetProgressBarColor(leftname) + HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL); + } if(leftcnt > 1) DrawNumIcon(autocvar_hud_panel_powerups_iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, '1 1 1', 1); if(leftcnt <= 5) @@ -1926,8 +1931,11 @@ void HUD_Powerups(void) { barsize = eX * 0.5 * mySize_x * min(1, rightcnt/30) + eY * mySize_y; } - HUD_Panel_GetProgressBarColor(rightname) - HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL); + if(autocvar_hud_panel_powerups_progressbar) + { + HUD_Panel_GetProgressBarColor(rightname) + HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL); + } if(rightcnt > 1) DrawNumIcon(autocvar_hud_panel_powerups_iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, '1 1 1', 1); if(rightcnt <= 5) @@ -1946,8 +1954,11 @@ void HUD_Powerups(void) { barsize = eX * mySize_x * min(1, leftcnt/30) + eY * 0.5 * mySize_y; } - HUD_Panel_GetProgressBarColor(leftname) - HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL); + if(autocvar_hud_panel_powerups_progressbar) + { + HUD_Panel_GetProgressBarColor(leftname) + HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL); + } if(leftcnt > 1) DrawNumIcon(autocvar_hud_panel_powerups_iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, '1 1 1', 1); if(leftcnt <= 5) @@ -1964,8 +1975,11 @@ void HUD_Powerups(void) { barsize = eX * mySize_x * min(1, rightcnt/30) + eY * 0.5 * mySize_y; } - HUD_Panel_GetProgressBarColor(rightname) - HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL); + if(autocvar_hud_panel_powerups_progressbar) + { + HUD_Panel_GetProgressBarColor(rightname) + HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL); + } if(rightcnt > 1) DrawNumIcon(autocvar_hud_panel_powerups_iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, '1 1 1', 1); if(rightcnt <= 5) @@ -1992,8 +2006,11 @@ void HUD_Powerups(void) { numpos = pos + eY * 0.4 * mySize_x; } - HUD_Panel_GetProgressBarColor(leftname) - HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL); + if(autocvar_hud_panel_powerups_progressbar) + { + HUD_Panel_GetProgressBarColor(leftname) + HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL); + } if(leftcnt <= 5) drawpic_aspect_skin_expanding(picpos, leftname, '0.4 0.4 0' * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, bound(0, (leftcnt - leftexact) / 0.5, 1)); if(leftcnt > 1) @@ -2019,8 +2036,11 @@ void HUD_Powerups(void) { numpos = pos + eY * mySize_y - eY * 0.25 * mySize_x + eX * 0.5 * mySize_x; } - HUD_Panel_GetProgressBarColor(rightname) - HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL); + if(autocvar_hud_panel_powerups_progressbar) + { + HUD_Panel_GetProgressBarColor(rightname) + HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL); + } if(rightcnt <= 5) drawpic_aspect_skin_expanding(picpos, rightname, '0.4 0.4 0' * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, bound(0, (rightcnt - rightexact) / 0.5, 1)); if(rightcnt > 1) @@ -2093,16 +2113,22 @@ void HUD_HealthArmor(void) if(v_z) // NOT fully armored { biggercount = "health"; - HUD_Panel_GetProgressBarColor("health") - HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + if(autocvar_hud_panel_healtharmor_progressbar) + { + HUD_Panel_GetProgressBarColor("health") + HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + } if(armor) drawpic_aspect_skin(pos + eX * mySize_x - eX * 0.5 * mySize_y, "armor", '0.5 0.5 0' * mySize_y, '1 1 1', panel_fg_alpha * armor / health, DRAWFLAG_NORMAL); } else { biggercount = "armor"; - HUD_Panel_GetProgressBarColor("armor") - HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + if(autocvar_hud_panel_healtharmor_progressbar) + { + HUD_Panel_GetProgressBarColor("armor") + HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + } if(health) drawpic_aspect_skin(pos + eX * mySize_x - eX * 0.5 * mySize_y, "health", '0.5 0.5 0' * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); } @@ -2164,8 +2190,11 @@ void HUD_HealthArmor(void) barsize = eX * 0.5 * mySize_x * min(1, leftcnt/200) + eY * mySize_y; } - HUD_Panel_GetProgressBarColor(leftname) - HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + if(autocvar_hud_panel_healtharmor_progressbar) + { + HUD_Panel_GetProgressBarColor(leftname) + HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + } DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, 200), 1); } @@ -2179,8 +2208,11 @@ void HUD_HealthArmor(void) barsize = eX * 0.5 * mySize_x * min(1, rightcnt/200) + eY * mySize_y; } - HUD_Panel_GetProgressBarColor(rightname) - HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + if(autocvar_hud_panel_healtharmor_progressbar) + { + HUD_Panel_GetProgressBarColor(rightname) + HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + } DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, 200), 1); } @@ -2209,8 +2241,11 @@ void HUD_HealthArmor(void) barsize = eX * mySize_x * min(1, leftcnt/200) + eY * 0.5 * mySize_y; } - HUD_Panel_GetProgressBarColor(leftname) - HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + if(autocvar_hud_panel_healtharmor_progressbar) + { + HUD_Panel_GetProgressBarColor(leftname) + HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + } DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, 200), 1); } @@ -2224,8 +2259,11 @@ void HUD_HealthArmor(void) barsize = eX * mySize_x * min(1, rightcnt/200) + eY * 0.5 * mySize_y; } - HUD_Panel_GetProgressBarColor(rightname) - HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + if(autocvar_hud_panel_healtharmor_progressbar) + { + HUD_Panel_GetProgressBarColor(rightname) + HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + } DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, 200), 1); } @@ -2262,8 +2300,11 @@ void HUD_HealthArmor(void) numpos = pos + eY * 0.4 * mySize_x; } - HUD_Panel_GetProgressBarColor(leftname) - HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + if(autocvar_hud_panel_healtharmor_progressbar) + { + HUD_Panel_GetProgressBarColor(leftname) + HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + } drawpic_aspect_skin(picpos, leftname, '0.4 0.4 0' * mySize_x, '1 1 1', leftalpha * panel_fg_alpha, DRAWFLAG_NORMAL); drawstring_aspect(numpos, ftos(leftcnt), eX * 0.5 * mySize_x + eY * 0.25 * mySize_x, HUD_Get_Num_Color(leftcnt, 200), panel_fg_alpha, DRAWFLAG_NORMAL); } @@ -2286,8 +2327,11 @@ void HUD_HealthArmor(void) numpos = pos + eY * mySize_y - eY * 0.25 * mySize_x + eX * 0.5 * mySize_x; } - HUD_Panel_GetProgressBarColor(rightname) - HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + if(autocvar_hud_panel_healtharmor_progressbar) + { + HUD_Panel_GetProgressBarColor(rightname) + HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + } drawpic_aspect_skin(picpos, rightname, '0.4 0.4 0' * mySize_x, '1 1 1', rightalpha * panel_fg_alpha, DRAWFLAG_NORMAL); drawstring_aspect(numpos, ftos(rightcnt), eX * 0.5 * mySize_x + eY * 0.25 * mySize_x, HUD_Get_Num_Color(rightcnt, 200), panel_fg_alpha, DRAWFLAG_NORMAL); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.c b/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.c index 4f7d5b825..e5bae98cb 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.c +++ b/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.c @@ -66,14 +66,21 @@ void XonoticHUDHealthArmorDialog_fill(entity me) for(i = 0; i <= 10; ++i) e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5))); e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_healtharmor_progressbar", "Enable status bar")); me.TR(me); me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Status bar alignment:")); + setDependent(e, "hud_panel_healtharmor_progressbar", 1, 1); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "0", "Left")); + setDependent(e, "hud_panel_healtharmor_progressbar", 1, 1); me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "1", "Right")); + setDependent(e, "hud_panel_healtharmor_progressbar", 1, 1); me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "3", "Inward")); + setDependent(e, "hud_panel_healtharmor_progressbar", 1, 1); me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "4", "Outward")); + setDependent(e, "hud_panel_healtharmor_progressbar", 1, 1); me.TR(me); me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Icon alignment:")); me.TR(me); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_powerups.c b/qcsrc/menu/xonotic/dialog_hudpanel_powerups.c index 48a699486..33a138554 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_powerups.c +++ b/qcsrc/menu/xonotic/dialog_hudpanel_powerups.c @@ -66,14 +66,21 @@ void XonoticHUDPowerupsDialog_fill(entity me) for(i = 0; i <= 10; ++i) e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5))); e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_powerups_progressbar", "Enable status bar")); me.TR(me); me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Status bar alignment:")); + setDependent(e, "hud_panel_powerups_progressbar", 1, 1); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "0", "Left")); + setDependent(e, "hud_panel_powerups_progressbar", 1, 1); me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "1", "Right")); + setDependent(e, "hud_panel_powerups_progressbar", 1, 1); me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "3", "Inward")); + setDependent(e, "hud_panel_powerups_progressbar", 1, 1); me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "4", "Outward")); + setDependent(e, "hud_panel_powerups_progressbar", 1, 1); me.TR(me); me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Icon alignment:")); me.TR(me); -- 2.39.2