From 846f9e8ec4f91db438026423c9dd357a801c9243 Mon Sep 17 00:00:00 2001 From: Severin Meyer Date: Wed, 5 Aug 2015 14:30:32 +0200 Subject: [PATCH] Remove deprecated buff HUD panel and associated cvars --- _hud_descriptions.cfg | 12 ---- hud_luma.cfg | 12 ---- hud_luminos.cfg | 12 ---- hud_luminos_minimal.cfg | 12 ---- hud_luminos_minimal_xhair.cfg | 12 ---- hud_luminos_old.cfg | 12 ---- hud_nexuiz.cfg | 12 ---- qcsrc/client/autocvars.qh | 4 -- qcsrc/client/hud.qc | 66 --------------------- qcsrc/menu/classes.inc | 1 - qcsrc/menu/xonotic/dialog_hudpanel_buffs.qc | 24 -------- qcsrc/menu/xonotic/mainwindow.qc | 4 -- 12 files changed, 183 deletions(-) delete mode 100644 qcsrc/menu/xonotic/dialog_hudpanel_buffs.qc diff --git a/_hud_descriptions.cfg b/_hud_descriptions.cfg index 9113f7f4c..ec8ef0574 100644 --- a/_hud_descriptions.cfg +++ b/_hud_descriptions.cfg @@ -300,15 +300,3 @@ seta hud_panel_centerprint_fade_subsequent_passtwo "" "division factor for the s seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "" "minimum factor that the second pass can fade to" seta hud_panel_centerprint_fade_subsequent_minfontsize "" "minimum factor for the font size from the subsequent fading effects" seta hud_panel_centerprint_fade_minfontsize "" "minimum factor for the font size from the fading in/out effects" - -seta hud_panel_buffs "" "enable/disable this panel" -seta hud_panel_buffs_pos "" "position of this panel" -seta hud_panel_buffs_size "" "size of this panel" -seta hud_panel_buffs_bg "" "if set to something else than \"\" = override default background" -seta hud_panel_buffs_bg_color "" "if set to something else than \"\" = override default panel background color" -seta hud_panel_buffs_bg_color_team "" "override panel color with team color in team based games" -seta hud_panel_buffs_bg_alpha "" "if set to something else than \"\" = override default panel background alpha" -seta hud_panel_buffs_bg_border "" "if set to something else than \"\" = override default size of border around the background" -seta hud_panel_buffs_bg_padding "" "if set to something else than \"\" = override default padding of contents from border" -seta hud_panel_buffs_progressbar "" "use progressbar behind buff names" -seta hud_panel_buffs_progressbar_name "" "name of progressbar to use behind buff names" diff --git a/hud_luma.cfg b/hud_luma.cfg index cd219466f..b63bb4fdf 100644 --- a/hud_luma.cfg +++ b/hud_luma.cfg @@ -299,16 +299,4 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5" seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75" seta hud_panel_centerprint_fade_minfontsize "0" -seta hud_panel_buffs 1 -seta hud_panel_buffs_pos "0.325000 0.820000" -seta hud_panel_buffs_size "0.350000 0.050000" -seta hud_panel_buffs_bg "0" -seta hud_panel_buffs_bg_color "" -seta hud_panel_buffs_bg_color_team "" -seta hud_panel_buffs_bg_alpha "" -seta hud_panel_buffs_bg_border "" -seta hud_panel_buffs_bg_padding "" -seta hud_panel_buffs_progressbar 1 -seta hud_panel_buffs_progressbar_name "progressbar" - menu_sync diff --git a/hud_luminos.cfg b/hud_luminos.cfg index a294589e3..362b19af2 100644 --- a/hud_luminos.cfg +++ b/hud_luminos.cfg @@ -299,16 +299,4 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5" seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75" seta hud_panel_centerprint_fade_minfontsize "0" -seta hud_panel_buffs 1 -seta hud_panel_buffs_pos "0.450000 0.855000" -seta hud_panel_buffs_size "0.050000 0.070000" -seta hud_panel_buffs_bg "0" -seta hud_panel_buffs_bg_color "" -seta hud_panel_buffs_bg_color_team "" -seta hud_panel_buffs_bg_alpha "" -seta hud_panel_buffs_bg_border "" -seta hud_panel_buffs_bg_padding "" -seta hud_panel_buffs_progressbar 1 -seta hud_panel_buffs_progressbar_name "progressbar" - menu_sync diff --git a/hud_luminos_minimal.cfg b/hud_luminos_minimal.cfg index e86c8277a..213cecc77 100644 --- a/hud_luminos_minimal.cfg +++ b/hud_luminos_minimal.cfg @@ -299,16 +299,4 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5" seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75" seta hud_panel_centerprint_fade_minfontsize "0" -seta hud_panel_buffs 1 -seta hud_panel_buffs_pos "0.450000 0.855000" -seta hud_panel_buffs_size "0.050000 0.070000" -seta hud_panel_buffs_bg "0" -seta hud_panel_buffs_bg_color "" -seta hud_panel_buffs_bg_color_team "" -seta hud_panel_buffs_bg_alpha "" -seta hud_panel_buffs_bg_border "" -seta hud_panel_buffs_bg_padding "" -seta hud_panel_buffs_progressbar 1 -seta hud_panel_buffs_progressbar_name "progressbar" - menu_sync diff --git a/hud_luminos_minimal_xhair.cfg b/hud_luminos_minimal_xhair.cfg index 018a22716..b58c47b05 100644 --- a/hud_luminos_minimal_xhair.cfg +++ b/hud_luminos_minimal_xhair.cfg @@ -299,16 +299,4 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5" seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75" seta hud_panel_centerprint_fade_minfontsize "0" -seta hud_panel_buffs 1 -seta hud_panel_buffs_pos "0.450000 0.855000" -seta hud_panel_buffs_size "0.050000 0.070000" -seta hud_panel_buffs_bg "0" -seta hud_panel_buffs_bg_color "" -seta hud_panel_buffs_bg_color_team "" -seta hud_panel_buffs_bg_alpha "" -seta hud_panel_buffs_bg_border "" -seta hud_panel_buffs_bg_padding "" -seta hud_panel_buffs_progressbar 1 -seta hud_panel_buffs_progressbar_name "progressbar" - menu_sync diff --git a/hud_luminos_old.cfg b/hud_luminos_old.cfg index bea064fe3..33149cea6 100644 --- a/hud_luminos_old.cfg +++ b/hud_luminos_old.cfg @@ -299,16 +299,4 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5" seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75" seta hud_panel_centerprint_fade_minfontsize "0" -seta hud_panel_buffs 1 -seta hud_panel_buffs_pos "0.450000 0.855000" -seta hud_panel_buffs_size "0.050000 0.070000" -seta hud_panel_buffs_bg "0" -seta hud_panel_buffs_bg_color "" -seta hud_panel_buffs_bg_color_team "" -seta hud_panel_buffs_bg_alpha "" -seta hud_panel_buffs_bg_border "" -seta hud_panel_buffs_bg_padding "" -seta hud_panel_buffs_progressbar 1 -seta hud_panel_buffs_progressbar_name "progressbar" - menu_sync diff --git a/hud_nexuiz.cfg b/hud_nexuiz.cfg index cd39764bc..b30d5729a 100644 --- a/hud_nexuiz.cfg +++ b/hud_nexuiz.cfg @@ -299,16 +299,4 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5" seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75" seta hud_panel_centerprint_fade_minfontsize "0" -seta hud_panel_buffs 1 -seta hud_panel_buffs_pos "0.450000 0.855000" -seta hud_panel_buffs_size "0.050000 0.070000" -seta hud_panel_buffs_bg "0" -seta hud_panel_buffs_bg_color "" -seta hud_panel_buffs_bg_color_team "" -seta hud_panel_buffs_bg_alpha "" -seta hud_panel_buffs_bg_border "" -seta hud_panel_buffs_bg_padding "" -seta hud_panel_buffs_progressbar 1 -seta hud_panel_buffs_progressbar_name "progressbar" - menu_sync diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index 89b34ff55..87b7b698f 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -304,10 +304,6 @@ bool autocvar_hud_panel_powerups; int autocvar_hud_panel_powerups_baralign; int autocvar_hud_panel_powerups_iconalign; bool autocvar_hud_panel_powerups_progressbar; -bool autocvar_hud_panel_buffs; -bool autocvar_hud_panel_buffs_progressbar; -string autocvar_hud_panel_buffs_progressbar_name = "progressbar"; -//float autocvar_hud_panel_buffs_iconalign; bool autocvar_hud_panel_powerups_text; int autocvar_hud_panel_pressedkeys; float autocvar_hud_panel_pressedkeys_aspect; diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index cff29ca8c..9e678343b 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -4578,72 +4578,6 @@ void HUD_CenterPrint (void) } } -// Buffs (#18) -// -void HUD_Buffs(void) -{ - int buffs = getstati(STAT_BUFFS, 0, 24); - if(!autocvar__hud_configure) - { - if(!autocvar_hud_panel_buffs) return; - if(spectatee_status == -1) return; - if(getstati(STAT_HEALTH) <= 0) return; - if(!buffs) return; - } - else - { - buffs = Buff_Type_first.items; // force first buff - } - - int b = 0; // counter to tell other functions that we have buffs - entity e; - string s = ""; - for(e = Buff_Type_first; e; e = e.enemy) if(buffs & e.items) - { - ++b; - string o = strcat(rgb_to_hexcolor(Buff_Color(e.items)), Buff_PrettyName(e.items)); - if(s == "") - s = o; - else - s = strcat(s, " ", o); - } - - HUD_Panel_UpdateCvars(); - - - vector pos, mySize; - pos = panel_pos; - mySize = panel_size; - - HUD_Panel_DrawBg(bound(0, b, 1)); - if(panel_bg_padding) - { - pos += '1 1 0' * panel_bg_padding; - mySize -= '2 2 0' * panel_bg_padding; - } - - //float panel_ar = mySize_x/mySize_y; - //bool is_vertical = (panel_ar < 1); - //float buff_iconalign = autocvar_hud_panel_buffs_iconalign; - vector buff_offset = '0 0 0'; - - draw_beginBoldFont(); - float buff_time, buff_maxtime; - buff_time = bound(0, getstatf(STAT_BUFF_TIME) - time, 99); - buff_maxtime = 60; // TODO: stat? - for(e = Buff_Type_first; e; e = e.enemy) if(buffs & e.items) - { - if(buff_time && autocvar_hud_panel_buffs_progressbar) - HUD_Panel_DrawProgressBar(pos + buff_offset, mySize, autocvar_hud_panel_buffs_progressbar_name, buff_time/buff_maxtime, 0, 0, - Buff_Color(e.items) * -1 + '1 1 1', (autocvar_hud_progressbar_alpha * panel_fg_alpha) * 0.4, DRAWFLAG_NORMAL); - - //DrawNumIcon(pos + buff_offset, mySize, shield, "shield", is_vertical, buff_iconalign, '1 1 1', 1); - drawcolorcodedstring_aspect(pos + buff_offset, s, mySize, panel_fg_alpha * 0.5, DRAWFLAG_NORMAL); - } - - draw_endBoldFont(); -} - /* ================== diff --git a/qcsrc/menu/classes.inc b/qcsrc/menu/classes.inc index 5b0e417f9..df0223158 100644 --- a/qcsrc/menu/classes.inc +++ b/qcsrc/menu/classes.inc @@ -42,7 +42,6 @@ #include "xonotic/dialog_credits.qc" #include "xonotic/dialog_firstrun.qc" #include "xonotic/dialog_hudpanel_ammo.qc" -#include "xonotic/dialog_hudpanel_buffs.qc" #include "xonotic/dialog_hudpanel_centerprint.qc" #include "xonotic/dialog_hudpanel_chat.qc" #include "xonotic/dialog_hudpanel_engineinfo.qc" diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_buffs.qc b/qcsrc/menu/xonotic/dialog_hudpanel_buffs.qc deleted file mode 100644 index 7733fd350..000000000 --- a/qcsrc/menu/xonotic/dialog_hudpanel_buffs.qc +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef DIALOG_HUDPANEL_BUFFS_H -#define DIALOG_HUDPANEL_BUFFS_H -#include "rootdialog.qc" -CLASS(XonoticHUDBuffsDialog, XonoticRootDialog) - METHOD(XonoticHUDBuffsDialog, fill, void(entity)) - ATTRIB(XonoticHUDBuffsDialog, title, string, _("Buffs Panel")) - ATTRIB(XonoticHUDBuffsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT) - ATTRIB(XonoticHUDBuffsDialog, intendedWidth, float, 0.4) - ATTRIB(XonoticHUDBuffsDialog, rows, float, 15) - ATTRIB(XonoticHUDBuffsDialog, columns, float, 4) - ATTRIB(XonoticHUDBuffsDialog, name, string, "HUDbuffs") - ATTRIB(XonoticHUDBuffsDialog, requiresConnection, float, true) -ENDCLASS(XonoticHUDBuffsDialog) -#endif - -#ifdef IMPLEMENTATION -void XonoticHUDBuffsDialog_fill(entity me) -{ - entity e; - string panelname = "buffs"; - - DIALOG_HUDPANEL_COMMON(); -} -#endif diff --git a/qcsrc/menu/xonotic/mainwindow.qc b/qcsrc/menu/xonotic/mainwindow.qc index 7af6e9363..a3e0727fb 100644 --- a/qcsrc/menu/xonotic/mainwindow.qc +++ b/qcsrc/menu/xonotic/mainwindow.qc @@ -128,10 +128,6 @@ void MainWindow_configureMainWindow(entity me) i.configureDialog(i); me.addItemRightCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); - i = NEW(XonoticHUDBuffsDialog); - i.configureDialog(i); - me.addItemRightCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); - // dialogs used by settings me.userbindEditDialog = i = NEW(XonoticUserbindEditDialog); -- 2.39.2