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"
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
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
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
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
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
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
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;
}
}
-// 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();
-}
-
/*
==================
#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"
+++ /dev/null
-#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
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);