From 5bc83017705061b3155dc662b7da1ac88fe1917d Mon Sep 17 00:00:00 2001 From: Severin Meyer Date: Tue, 4 Aug 2015 14:53:52 +0200 Subject: [PATCH] Rewrite the powerup panel to handle a variable number of items, and add the buffs to the powerup panel --- _hud_descriptions.cfg | 6 +- hud_luma.cfg | 4 - hud_luminos.cfg | 4 - hud_luminos_minimal.cfg | 4 - hud_luminos_minimal_xhair.cfg | 4 - hud_luminos_old.cfg | 4 - hud_nexuiz.cfg | 4 - qcsrc/client/autocvars.qh | 4 - qcsrc/client/hud.qc | 305 ++++++++++-------- qcsrc/client/hud.qh | 3 +- qcsrc/client/hud_config.qc | 7 - .../menu/xonotic/dialog_hudpanel_powerups.qc | 4 +- 12 files changed, 166 insertions(+), 187 deletions(-) diff --git a/_hud_descriptions.cfg b/_hud_descriptions.cfg index c37b4fb64..9113f7f4c 100644 --- a/_hud_descriptions.cfg +++ b/_hud_descriptions.cfg @@ -88,7 +88,6 @@ seta hud_panel_ammo_text "" "show text/icons in the ammo panel" seta hud_panel_powerups "" "enable/disable this panel" seta hud_panel_powerups_pos "" "position of this panel" seta hud_panel_powerups_size "" "size of this panel" -seta hud_panel_powerups_flip "" "flip strength/shield positions" seta hud_panel_powerups_baralign "" "0 = align bars to the left, 1 = align bars to the right, 2 = align only left bar to the right, 3 = align only right bar to the right" seta hud_panel_powerups_iconalign "" "0 = align icons to the left, 1 = align icons to the right, 2 = align only left icon to the right, 3 = align only right icon to the right" seta hud_panel_powerups_bg "" "if set to something else than \"\" = override default background" @@ -98,10 +97,7 @@ seta hud_panel_powerups_bg_alpha "" "if set to something else than \"\" = overri 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_powerups_progressbar_strength "" "progressbar image for strength" -seta hud_panel_powerups_progressbar_shield "" "progressbar image for shield" -seta hud_panel_powerups_progressbar_superweapons "" "progressbar image for superweapons" -seta hud_panel_powerups_text "" "show text/icons in the powerups panel" +seta hud_panel_powerups_text "" "show text and icons in the powerups panel" seta hud_panel_healtharmor "" "enable/disable this panel, 2 = combined health/armor display" seta hud_panel_healtharmor_pos "" "position of this panel" diff --git a/hud_luma.cfg b/hud_luma.cfg index 0edab56db..4deb6b9e0 100644 --- a/hud_luma.cfg +++ b/hud_luma.cfg @@ -92,13 +92,9 @@ seta hud_panel_powerups_bg_color_team "" seta hud_panel_powerups_bg_alpha "" seta hud_panel_powerups_bg_border "" seta hud_panel_powerups_bg_padding "" -seta hud_panel_powerups_flip "1" seta hud_panel_powerups_iconalign "2" seta hud_panel_powerups_baralign "2" seta hud_panel_powerups_progressbar "1" -seta hud_panel_powerups_progressbar_strength "progressbar" -seta hud_panel_powerups_progressbar_shield "progressbar" -seta hud_panel_powerups_progressbar_superweapons "progressbar" seta hud_panel_powerups_text "1" seta hud_panel_healtharmor 1 diff --git a/hud_luminos.cfg b/hud_luminos.cfg index b15e82c52..879b4d932 100644 --- a/hud_luminos.cfg +++ b/hud_luminos.cfg @@ -92,13 +92,9 @@ seta hud_panel_powerups_bg_color_team "" seta hud_panel_powerups_bg_alpha "" seta hud_panel_powerups_bg_border "" seta hud_panel_powerups_bg_padding "" -seta hud_panel_powerups_flip "1" seta hud_panel_powerups_iconalign "3" seta hud_panel_powerups_baralign "3" seta hud_panel_powerups_progressbar "1" -seta hud_panel_powerups_progressbar_strength "progressbar" -seta hud_panel_powerups_progressbar_shield "progressbar" -seta hud_panel_powerups_progressbar_superweapons "progressbar" seta hud_panel_powerups_text "1" seta hud_panel_healtharmor 1 diff --git a/hud_luminos_minimal.cfg b/hud_luminos_minimal.cfg index 299417659..e86c8277a 100644 --- a/hud_luminos_minimal.cfg +++ b/hud_luminos_minimal.cfg @@ -92,13 +92,9 @@ seta hud_panel_powerups_bg_color_team "" seta hud_panel_powerups_bg_alpha "" seta hud_panel_powerups_bg_border "" seta hud_panel_powerups_bg_padding "-3" -seta hud_panel_powerups_flip "1" seta hud_panel_powerups_iconalign "1" seta hud_panel_powerups_baralign "1" seta hud_panel_powerups_progressbar "1" -seta hud_panel_powerups_progressbar_strength "progressbar" -seta hud_panel_powerups_progressbar_shield "progressbar" -seta hud_panel_powerups_progressbar_superweapons "progressbar" seta hud_panel_powerups_text "1" seta hud_panel_healtharmor 1 diff --git a/hud_luminos_minimal_xhair.cfg b/hud_luminos_minimal_xhair.cfg index a1f79cb58..018a22716 100644 --- a/hud_luminos_minimal_xhair.cfg +++ b/hud_luminos_minimal_xhair.cfg @@ -92,13 +92,9 @@ seta hud_panel_powerups_bg_color_team "" seta hud_panel_powerups_bg_alpha "" seta hud_panel_powerups_bg_border "" seta hud_panel_powerups_bg_padding "-3" -seta hud_panel_powerups_flip "1" seta hud_panel_powerups_iconalign "1" seta hud_panel_powerups_baralign "1" seta hud_panel_powerups_progressbar "1" -seta hud_panel_powerups_progressbar_strength "progressbar" -seta hud_panel_powerups_progressbar_shield "progressbar" -seta hud_panel_powerups_progressbar_superweapons "progressbar" seta hud_panel_powerups_text "1" seta hud_panel_healtharmor 1 diff --git a/hud_luminos_old.cfg b/hud_luminos_old.cfg index b45c9f4bd..bea064fe3 100644 --- a/hud_luminos_old.cfg +++ b/hud_luminos_old.cfg @@ -92,13 +92,9 @@ seta hud_panel_powerups_bg_color_team "" seta hud_panel_powerups_bg_alpha "" seta hud_panel_powerups_bg_border "" seta hud_panel_powerups_bg_padding "" -seta hud_panel_powerups_flip "1" seta hud_panel_powerups_iconalign "3" seta hud_panel_powerups_baralign "3" seta hud_panel_powerups_progressbar "1" -seta hud_panel_powerups_progressbar_strength "progressbar" -seta hud_panel_powerups_progressbar_shield "progressbar" -seta hud_panel_powerups_progressbar_superweapons "progressbar" seta hud_panel_powerups_text "1" seta hud_panel_healtharmor 1 diff --git a/hud_nexuiz.cfg b/hud_nexuiz.cfg index 9e4e174a2..cd39764bc 100644 --- a/hud_nexuiz.cfg +++ b/hud_nexuiz.cfg @@ -92,13 +92,9 @@ seta hud_panel_powerups_bg_color_team "" seta hud_panel_powerups_bg_alpha "" seta hud_panel_powerups_bg_border "" 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_powerups_progressbar_strength "progressbar" -seta hud_panel_powerups_progressbar_shield "progressbar" -seta hud_panel_powerups_progressbar_superweapons "progressbar" seta hud_panel_powerups_text "1" seta hud_panel_healtharmor 1 diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index 646415a8e..89b34ff55 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -302,16 +302,12 @@ bool autocvar_hud_panel_physics_topspeed; float autocvar_hud_panel_physics_topspeed_time; bool autocvar_hud_panel_powerups; int autocvar_hud_panel_powerups_baralign; -bool autocvar_hud_panel_powerups_flip; 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; -string autocvar_hud_panel_powerups_progressbar_shield; -string autocvar_hud_panel_powerups_progressbar_strength; -string autocvar_hud_panel_powerups_progressbar_superweapons; 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 9b0e5895c..cff29ca8c 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -1301,196 +1301,217 @@ void DrawNumIcon(vector myPos, vector mySize, float x, string icon, bool vertica // Powerups (#2) // + +// Powerup item fields (reusing existing fields) +.string message; // Human readable name +.string netname; // Icon name +.vector colormod; // Color +.float count; // Time left +.float lifetime; // Maximum time + +entity powerupItems; +int powerupItemsCount; + +void resetPowerupItems() +{ + entity item; + for(item = powerupItems; item; item = item.chain) + item.count = 0; + + powerupItemsCount = 0; +} + +void addPowerupItem(string name, string icon, vector color, float currentTime, float lifeTime) +{ + if(!powerupItems) + powerupItems = spawn(); + + entity item; + for(item = powerupItems; item.count; item = item.chain) + if(!item.chain) + item.chain = spawn(); + + item.message = name; + item.netname = icon; + item.colormod = color; + item.count = currentTime; + item.lifetime = lifeTime; + + ++powerupItemsCount; +} + +int getPowerupItemAlign(int align, int column, int row, int columns, int rows, bool isVertical) +{ + if(align < 2) + return align; + + bool isTop = isVertical && rows > 1 && row == 0; + bool isBottom = isVertical && rows > 1 && row == rows-1; + bool isLeft = !isVertical && columns > 1 && column == 0; + bool isRight = !isVertical && columns > 1 && column == columns-1; + + if(isTop || isLeft) return (align == 2) ? 1 : 0; + if(isBottom || isRight) return (align == 2) ? 0 : 1; + + return 2; +} + void HUD_Powerups(void) { - float strength_time, shield_time, superweapons_time; + int allItems = getstati(STAT_ITEMS, 0, 24); + int allBuffs = getstati(STAT_BUFFS, 0, 24); + int strengthTime, shieldTime, superTime; + + // Initialize items if(!autocvar__hud_configure) { if(!autocvar_hud_panel_powerups) return; if(spectatee_status == -1) return; - if(!(getstati(STAT_ITEMS, 0, 24) & (IT_STRENGTH | IT_INVINCIBLE | IT_SUPERWEAPON))) return; - if (getstati(STAT_HEALTH) <= 0) return; + if(getstati(STAT_HEALTH) <= 0) return; + if(!(allItems & (IT_STRENGTH | IT_INVINCIBLE | IT_SUPERWEAPON)) && !allBuffs) return; - strength_time = bound(0, getstatf(STAT_STRENGTH_FINISHED) - time, 99); - shield_time = bound(0, getstatf(STAT_INVINCIBLE_FINISHED) - time, 99); - superweapons_time = bound(0, getstatf(STAT_SUPERWEAPONS_FINISHED) - time, 99); + strengthTime = bound(0, getstatf(STAT_STRENGTH_FINISHED) - time, 99); + shieldTime = bound(0, getstatf(STAT_INVINCIBLE_FINISHED) - time, 99); + superTime = bound(0, getstatf(STAT_SUPERWEAPONS_FINISHED) - time, 99); - if (getstati(STAT_ITEMS, 0, 24) & IT_UNLIMITED_SUPERWEAPONS) - superweapons_time = 99; // force max + if(allItems & IT_UNLIMITED_SUPERWEAPONS) + superTime = 99; - // prevent stuff to show up on mismatch that will be fixed next frame - if (!(getstati(STAT_ITEMS, 0, 24) & IT_SUPERWEAPON)) - superweapons_time = 0; + // Prevent stuff to show up on mismatch that will be fixed next frame + if(!(allItems & IT_SUPERWEAPON)) + superTime = 0; } else { - strength_time = 15; - shield_time = 27; - superweapons_time = 13; + strengthTime = 15; + shieldTime = 27; + superTime = 13; + allBuffs = 0; } - HUD_Panel_UpdateCvars(); + // Add items to linked list + resetPowerupItems(); - draw_beginBoldFont(); + if(strengthTime) + addPowerupItem("Strength", "strength", autocvar_hud_progressbar_strength_color, strengthTime, 30); + if(shieldTime) + addPowerupItem("Shield", "shield", autocvar_hud_progressbar_shield_color, shieldTime, 30); + if(superTime) + addPowerupItem("Superweapons", "superweapons", autocvar_hud_progressbar_superweapons_color, superTime, 30); - vector pos, mySize; - pos = panel_pos; - mySize = panel_size; + entity item; + for(item = Buff_Type_first; item; item = item.enemy) + if(allBuffs & item.items) + addPowerupItem(item.message, strcat("buff_", item.netname), item.colormod, bound(0, getstatf(STAT_BUFF_TIME) - time, 99), 60); + + if(!powerupItemsCount) + return; + + // Draw panel background + HUD_Panel_UpdateCvars(); + HUD_Panel_DrawBg(1); + + // Set drawing area + vector pos = panel_pos; + vector size = panel_size; + bool isVertical = size.y > size.x; - HUD_Panel_DrawBg(bound(0, max(strength_time, shield_time, superweapons_time), 1)); if(panel_bg_padding) { pos += '1 1 0' * panel_bg_padding; - mySize -= '2 2 0' * panel_bg_padding; + size -= '2 2 0' * panel_bg_padding; } - float panel_ar = mySize.x/mySize.y; - bool is_vertical = (panel_ar < 1); - vector shield_offset = '0 0 0', strength_offset = '0 0 0', superweapons_offset = '0 0 0'; - - int superweapons_is = -1; + // Find best partitioning of the drawing area + const float DESIRED_ASPECT = 6; + float aspect = 0, a; + int columns = 0, c; + int rows = 0, r; + int i = 1; - if(superweapons_time) + do { - if(strength_time) - { - if(shield_time) - superweapons_is = 0; - else - superweapons_is = 2; - } - else - { - if(shield_time) - superweapons_is = 1; - else - superweapons_is = 2; - } - } + c = floor(powerupItemsCount / i); + r = ceil(powerupItemsCount / c); + a = isVertical ? (size.y/r) / (size.x/c) : (size.x/c) / (size.y/r); - // FIXME handle superweapons here - if(superweapons_is == 0) - { - if (panel_ar >= 4 || (panel_ar >= 1/4 && panel_ar < 1)) + if(i == 1 || fabs(DESIRED_ASPECT - a) < fabs(DESIRED_ASPECT - aspect)) { - mySize.x *= (1.0 / 3.0); - superweapons_offset.x = mySize.x; - if (autocvar_hud_panel_powerups_flip) - shield_offset.x = 2*mySize.x; - else - strength_offset.x = 2*mySize.x; - } - else - { - mySize.y *= (1.0 / 3.0); - superweapons_offset.y = mySize.y; - if (autocvar_hud_panel_powerups_flip) - shield_offset.y = 2*mySize.y; - else - strength_offset.y = 2*mySize.y; + aspect = a; + columns = c; + rows = r; } } - else + while(++i <= powerupItemsCount); + + // Prevent single items from getting too wide + if(powerupItemsCount == 1 && aspect > DESIRED_ASPECT) { - if (panel_ar >= 4 || (panel_ar >= 1/4 && panel_ar < 1)) + if(isVertical) { - mySize.x *= 0.5; - if (autocvar_hud_panel_powerups_flip) - shield_offset.x = mySize.x; - else - strength_offset.x = mySize.x; + size.y *= 0.5; + pos.y += size.y * 0.5; } else { - mySize.y *= 0.5; - if (autocvar_hud_panel_powerups_flip) - shield_offset.y = mySize.y; - else - strength_offset.y = mySize.y; + size.x *= 0.5; + pos.x += size.x * 0.5; } } - bool shield_baralign, strength_baralign, superweapons_baralign; - bool shield_iconalign, strength_iconalign, superweapons_iconalign; + // Draw items from linked list + vector itemPos = pos; + vector itemSize = eX * (size.x / columns) + eY * (size.y / rows); + vector textColor = '1 1 1'; - if (autocvar_hud_panel_powerups_flip) - { - strength_baralign = (autocvar_hud_panel_powerups_baralign == 2 || autocvar_hud_panel_powerups_baralign == 1); - shield_baralign = (autocvar_hud_panel_powerups_baralign == 3 || autocvar_hud_panel_powerups_baralign == 1); - strength_iconalign = (autocvar_hud_panel_powerups_iconalign == 2 || autocvar_hud_panel_powerups_iconalign == 1); - shield_iconalign = (autocvar_hud_panel_powerups_iconalign == 3 || autocvar_hud_panel_powerups_iconalign == 1); - } - else - { - shield_baralign = (autocvar_hud_panel_powerups_baralign == 2 || autocvar_hud_panel_powerups_baralign == 1); - strength_baralign = (autocvar_hud_panel_powerups_baralign == 3 || autocvar_hud_panel_powerups_baralign == 1); - shield_iconalign = (autocvar_hud_panel_powerups_iconalign == 2 || autocvar_hud_panel_powerups_iconalign == 1); - strength_iconalign = (autocvar_hud_panel_powerups_iconalign == 3 || autocvar_hud_panel_powerups_iconalign == 1); - } + int fullSeconds = 0; + int align = 0; + int column = 0; + int row = 0; - if(superweapons_is == 0) - { - superweapons_iconalign = strength_iconalign; - superweapons_baralign = 2; - } - else if(superweapons_is == 1) - { - superweapons_offset = strength_offset; - superweapons_iconalign = strength_iconalign; - superweapons_baralign = strength_baralign; - } - else // if(superweapons_is == 2) + draw_beginBoldFont(); + for(item = powerupItems; item.count; item = item.chain) { - superweapons_offset = shield_offset; - superweapons_iconalign = shield_iconalign; - superweapons_baralign = shield_baralign; - } + itemPos = eX * (pos.x + column * itemSize.x) + eY * (pos.y + row * itemSize.y); - if(shield_time) - { - const float maxshield = 30; - float shield = ceil(shield_time); + // Draw progressbar if(autocvar_hud_panel_powerups_progressbar) - HUD_Panel_DrawProgressBar(pos + shield_offset, mySize, autocvar_hud_panel_powerups_progressbar_shield, shield/maxshield, is_vertical, shield_baralign, autocvar_hud_progressbar_shield_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); - if(autocvar_hud_panel_powerups_text) { - if(shield > 1) - DrawNumIcon(pos + shield_offset, mySize, shield, "shield", is_vertical, shield_iconalign, '1 1 1', 1); - if(shield <= 5) - DrawNumIcon_expanding(pos + shield_offset, mySize, shield, "shield", is_vertical, shield_iconalign, '1 1 1', 1, bound(0, (shield - shield_time) / 0.5, 1)); + align = getPowerupItemAlign(autocvar_hud_panel_powerups_baralign, column, row, columns, rows, isVertical); + HUD_Panel_DrawProgressBar(itemPos, itemSize, "progressbar", item.count / item.lifetime, isVertical, align, item.colormod, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); } - } - if(strength_time) - { - const float maxstrength = 30; - float strength = ceil(strength_time); - if(autocvar_hud_panel_powerups_progressbar) - HUD_Panel_DrawProgressBar(pos + strength_offset, mySize, autocvar_hud_panel_powerups_progressbar_strength, strength/maxstrength, is_vertical, strength_baralign, autocvar_hud_progressbar_strength_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + // Draw icon and text if(autocvar_hud_panel_powerups_text) { - if(strength > 1) - DrawNumIcon(pos + strength_offset, mySize, strength, "strength", is_vertical, strength_iconalign, '1 1 1', 1); - if(strength <= 5) - DrawNumIcon_expanding(pos + strength_offset, mySize, strength, "strength", is_vertical, strength_iconalign, '1 1 1', 1, bound(0, (strength - strength_time) / 0.5, 1)); + align = getPowerupItemAlign(autocvar_hud_panel_powerups_iconalign, column, row, columns, rows, isVertical); + fullSeconds = ceil(item.count); + textColor = '0.6 0.6 0.6' + (item.colormod * 0.4); + + if(item.count > 1) + DrawNumIcon(itemPos, itemSize, fullSeconds, item.netname, isVertical, align, textColor, panel_fg_alpha); + if(item.count <= 5) + DrawNumIcon_expanding(itemPos, itemSize, fullSeconds, item.netname, isVertical, align, textColor, panel_fg_alpha, bound(0, (fullSeconds - item.count) / 0.5, 1)); } - } - if(superweapons_time) - { - const float maxsuperweapons = 30; - float superweapons = ceil(superweapons_time); - if(autocvar_hud_panel_powerups_progressbar) - HUD_Panel_DrawProgressBar(pos + superweapons_offset, mySize, autocvar_hud_panel_powerups_progressbar_superweapons, superweapons/maxsuperweapons, is_vertical, superweapons_baralign, autocvar_hud_progressbar_superweapons_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); - if(autocvar_hud_panel_powerups_text) + // Determine next section + if(isVertical) { - if(superweapons > 1) - DrawNumIcon(pos + superweapons_offset, mySize, superweapons, "superweapons", is_vertical, superweapons_iconalign, '1 1 1', 1); - if(superweapons <= 5) - DrawNumIcon_expanding(pos + superweapons_offset, mySize, superweapons, "superweapons", is_vertical, superweapons_iconalign, '1 1 1', 1, bound(0, (superweapons - superweapons_time) / 0.5, 1)); + if(++column >= columns) + { + column = 0; + ++row; + } + } + else + { + if(++row >= rows) + { + row = 0; + ++column; + } } } - draw_endBoldFont(); } @@ -2892,7 +2913,7 @@ void HUD_Mod_CTF(vector pos, vector mySize) yellowflag = (stat_items/CTF_YELLOW_FLAG_TAKEN) & 3; pinkflag = (stat_items/CTF_PINK_FLAG_TAKEN) & 3; neutralflag = (stat_items/CTF_NEUTRAL_FLAG_TAKEN) & 3; - + ctf_oneflag = (stat_items & CTF_FLAG_NEUTRAL); mod_active = (redflag || blueflag || yellowflag || pinkflag || neutralflag); @@ -4588,7 +4609,7 @@ void HUD_Buffs(void) } HUD_Panel_UpdateCvars(); - + vector pos, mySize; pos = panel_pos; @@ -4613,7 +4634,7 @@ void HUD_Buffs(void) 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, + 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); diff --git a/qcsrc/client/hud.qh b/qcsrc/client/hud.qh index 5bc2ca4a7..cdbe2cb41 100644 --- a/qcsrc/client/hud.qh +++ b/qcsrc/client/hud.qh @@ -154,8 +154,7 @@ int prev_p_health, prev_p_armor; HUD_PANEL(ENGINEINFO , HUD_EngineInfo , engineinfo) \ HUD_PANEL(INFOMESSAGES , HUD_InfoMessages , infomessages) \ HUD_PANEL(PHYSICS , HUD_Physics , physics) \ - HUD_PANEL(CENTERPRINT , HUD_CenterPrint , centerprint) \ - HUD_PANEL(BUFFS , HUD_Buffs , buffs) + HUD_PANEL(CENTERPRINT , HUD_CenterPrint , centerprint) #define HUD_PANEL(NAME, draw_func, name) \ int HUD_PANEL_##NAME; \ diff --git a/qcsrc/client/hud_config.qc b/qcsrc/client/hud_config.qc index 72233a0ac..f96944c3f 100644 --- a/qcsrc/client/hud_config.qc +++ b/qcsrc/client/hud_config.qc @@ -110,12 +110,9 @@ void HUD_Panel_ExportCfg(string cfgname) HUD_Write_PanelCvar_q("_text"); break; case HUD_PANEL_POWERUPS: - HUD_Write_PanelCvar_q("_flip"); HUD_Write_PanelCvar_q("_iconalign"); HUD_Write_PanelCvar_q("_baralign"); HUD_Write_PanelCvar_q("_progressbar"); - HUD_Write_PanelCvar_q("_progressbar_strength"); - HUD_Write_PanelCvar_q("_progressbar_shield"); HUD_Write_PanelCvar_q("_text"); break; case HUD_PANEL_HEALTHARMOR: @@ -203,10 +200,6 @@ void HUD_Panel_ExportCfg(string cfgname) HUD_Write_PanelCvar_q("_fade_subsequent_passtwo_minalpha"); HUD_Write_PanelCvar_q("_fade_subsequent_minfontsize"); HUD_Write_PanelCvar_q("_fade_minfontsize"); - break; - case HUD_PANEL_BUFFS: - HUD_Write_PanelCvar_q("_progressbar"); - HUD_Write_PanelCvar_q("_progressbar_name"); } HUD_Write("\n"); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc b/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc index 45a2049fc..0fdb35f49 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc @@ -6,7 +6,7 @@ CLASS(XonoticHUDPowerupsDialog, XonoticRootDialog) ATTRIB(XonoticHUDPowerupsDialog, title, string, _("Powerups Panel")) ATTRIB(XonoticHUDPowerupsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT) ATTRIB(XonoticHUDPowerupsDialog, intendedWidth, float, 0.4) - ATTRIB(XonoticHUDPowerupsDialog, rows, float, 15) + ATTRIB(XonoticHUDPowerupsDialog, rows, float, 14) ATTRIB(XonoticHUDPowerupsDialog, columns, float, 4) ATTRIB(XonoticHUDPowerupsDialog, name, string, "HUDpowerups") ATTRIB(XonoticHUDPowerupsDialog, requiresConnection, float, true) @@ -44,7 +44,5 @@ void XonoticHUDPowerupsDialog_fill(entity me) me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "1", _("Right"))); me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "2", _("Inward"))); me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "3", _("Outward"))); - me.TR(me); - me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_powerups_flip", _("Flip strength and shield positions"))); } #endif -- 2.39.2