From a7ee75e408dbdc0956276250fe909a1c2e1530c7 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 27 Aug 2023 11:08:40 +0200 Subject: [PATCH] Minigames: apply panel alpha to highlights too --- qcsrc/common/minigames/cl_minigames_hud.qc | 5 ++--- qcsrc/common/minigames/minigame/bd.qc | 6 +++--- qcsrc/common/minigames/minigame/c4.qc | 6 +++--- qcsrc/common/minigames/minigame/nmm.qc | 6 +++--- qcsrc/common/minigames/minigame/pong.qc | 2 +- qcsrc/common/minigames/minigame/pp.qc | 6 +++--- qcsrc/common/minigames/minigame/ps.qc | 6 +++--- 7 files changed, 18 insertions(+), 19 deletions(-) diff --git a/qcsrc/common/minigames/cl_minigames_hud.qc b/qcsrc/common/minigames/cl_minigames_hud.qc index 973ca428a..174bec63a 100644 --- a/qcsrc/common/minigames/cl_minigames_hud.qc +++ b/qcsrc/common/minigames/cl_minigames_hud.qc @@ -537,8 +537,7 @@ void HUD_MinigameMenu () if ( e.flags & 2 ) { - drawfill(panel_pos, eX*panel_size_x + eY*itemh, e.colormod, - panel_fg_alpha, DRAWFLAG_NORMAL); + drawfill(panel_pos, eX*panel_size_x + eY*itemh, e.colormod, panel_fg_alpha, DRAWFLAG_NORMAL); color = '0 0 0'; } @@ -555,7 +554,7 @@ void HUD_MinigameMenu () HUD_MinigameMenu_DrawEntry(panel_pos+offset,e.message,e.size,color); if ( e == HUD_MinigameMenu_activeitem ) - drawfill(panel_pos, eX*panel_size_x + eY*itemh,'1 1 1', 0.25, DRAWFLAG_ADDITIVE); + drawfill(panel_pos, eX*panel_size_x + eY*itemh,'1 1 1', 0.25 * panel_fg_alpha, DRAWFLAG_ADDITIVE); panel_pos_y += itemh; } diff --git a/qcsrc/common/minigames/minigame/bd.qc b/qcsrc/common/minigames/minigame/bd.qc index 635d1b8d5..9c56247af 100644 --- a/qcsrc/common/minigames/minigame/bd.qc +++ b/qcsrc/common/minigames/minigame/bd.qc @@ -1114,7 +1114,7 @@ void bd_hud_board(vector pos, vector mySize) win_sz = minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos, victory_text, winfs, 0, DRAWFLAG_NORMAL, 0.5); - drawfill(win_pos-eY*hud_fontsize_y,win_sz+2*eY*hud_fontsize_y,'0.3 0.3 1',0.8,DRAWFLAG_ADDITIVE); + drawfill(win_pos-eY*hud_fontsize_y,win_sz+2*eY*hud_fontsize_y,'0.3 0.3 1',0.8*panel_fg_alpha,DRAWFLAG_ADDITIVE); minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos, victory_text, winfs, panel_fg_alpha, DRAWFLAG_NORMAL, 0.5); @@ -1142,9 +1142,9 @@ void bd_hud_status(vector pos, vector mySize) if(minigame_self.team != BD_SPECTATOR_TEAM) { mypos = pos; - drawfill(mypos,eX*mySize_x+eY*player_fontsize_y,'1 1 1',0.5,DRAWFLAG_ADDITIVE); + drawfill(mypos,eX*mySize_x+eY*player_fontsize_y,'1 1 1',0.5*panel_fg_alpha,DRAWFLAG_ADDITIVE); mypos_y += player_fontsize_y; - drawfill(mypos,eX*mySize_x+eY*tile_size_y,'1 1 1',0.25,DRAWFLAG_ADDITIVE); + drawfill(mypos,eX*mySize_x+eY*tile_size_y,'1 1 1',0.25*panel_fg_alpha,DRAWFLAG_ADDITIVE); } entity e; diff --git a/qcsrc/common/minigames/minigame/c4.qc b/qcsrc/common/minigames/minigame/c4.qc index 142e50c89..7e6407bf3 100644 --- a/qcsrc/common/minigames/minigame/c4.qc +++ b/qcsrc/common/minigames/minigame/c4.qc @@ -316,7 +316,7 @@ void c4_hud_board(vector pos, vector mySize) sprintf(_("%s^7 won the game!"), pname), winfs, 0, DRAWFLAG_NORMAL, 0.5); - drawfill(win_pos-eY*hud_fontsize_y,win_sz+2*eY*hud_fontsize_y,'1 1 1',0.5,DRAWFLAG_ADDITIVE); + drawfill(win_pos-eY*hud_fontsize_y,win_sz+2*eY*hud_fontsize_y,'1 1 1',0.5*panel_fg_alpha,DRAWFLAG_ADDITIVE); minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos, sprintf(_("%s^7 won the game!"), pname), @@ -347,9 +347,9 @@ void c4_hud_status(vector pos, vector mySize) mypos = pos; if ( (active_minigame.minigame_flags&C4_TURN_TEAM) == 2 ) mypos_y += player_fontsize_y + ts_y; - drawfill(mypos,eX*mySize_x+eY*player_fontsize_y,'1 1 1',0.5,DRAWFLAG_ADDITIVE); + drawfill(mypos,eX*mySize_x+eY*player_fontsize_y,'1 1 1',0.5*panel_fg_alpha,DRAWFLAG_ADDITIVE); mypos_y += player_fontsize_y; - drawfill(mypos,eX*mySize_x+eY*tile_size_y,'1 1 1',0.25,DRAWFLAG_ADDITIVE); + drawfill(mypos,eX*mySize_x+eY*tile_size_y,'1 1 1',0.25*panel_fg_alpha,DRAWFLAG_ADDITIVE); } entity e; diff --git a/qcsrc/common/minigames/minigame/nmm.qc b/qcsrc/common/minigames/minigame/nmm.qc index ea7f3b42c..b550f79a3 100644 --- a/qcsrc/common/minigames/minigame/nmm.qc +++ b/qcsrc/common/minigames/minigame/nmm.qc @@ -489,7 +489,7 @@ void nmm_hud_board(vector pos, vector mySize) sprintf(_("%s^7 won the game!"), pname), winfs, 0, DRAWFLAG_NORMAL, 0.5); - drawfill(win_pos-eY*hud_fontsize_y,win_sz+2*eY*hud_fontsize_y,'1 1 1',0.5,DRAWFLAG_ADDITIVE); + drawfill(win_pos-eY*hud_fontsize_y,win_sz+2*eY*hud_fontsize_y,'1 1 1',0.5*panel_fg_alpha,DRAWFLAG_ADDITIVE); minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos, sprintf(_("%s^7 won the game!"), pname), @@ -524,9 +524,9 @@ void nmm_hud_status(vector pos, vector mySize) mypos = pos; if ( (active_minigame.minigame_flags&NMM_TURN_TEAM) == 2 ) mypos_y += player_fontsize_y + ts_y; - drawfill(mypos,eX*mySize_x+eY*player_fontsize_y,'1 1 1',0.5,DRAWFLAG_ADDITIVE); + drawfill(mypos,eX*mySize_x+eY*player_fontsize_y,'1 1 1',0.5*panel_fg_alpha,DRAWFLAG_ADDITIVE); mypos_y += player_fontsize_y; - drawfill(mypos,eX*mySize_x+eY*piece_sz_y,'1 1 1',0.25,DRAWFLAG_ADDITIVE); + drawfill(mypos,eX*mySize_x+eY*piece_sz_y,'1 1 1',0.25*panel_fg_alpha,DRAWFLAG_ADDITIVE); } FOREACH_MINIGAME_ENTITY(e) diff --git a/qcsrc/common/minigames/minigame/pong.qc b/qcsrc/common/minigames/minigame/pong.qc index 698ccfb55..4acad766c 100644 --- a/qcsrc/common/minigames/minigame/pong.qc +++ b/qcsrc/common/minigames/minigame/pong.qc @@ -601,7 +601,7 @@ void pong_hud_status(vector pos, vector mySize) mypos = pos; mypos_y += (e.team-1) * (player_fontsize_y + ts_y); - drawfill(mypos, ts, pong_team_to_color(e.team), 0.25, DRAWFLAG_ADDITIVE); + drawfill(mypos, ts, pong_team_to_color(e.team), 0.25 * panel_fg_alpha, DRAWFLAG_ADDITIVE); minigame_drawcolorcodedstring_trunc(mySize_x,mypos, (e.minigame_playerslot ? entcs_GetName(e.minigame_playerslot-1) : _("AI")), diff --git a/qcsrc/common/minigames/minigame/pp.qc b/qcsrc/common/minigames/minigame/pp.qc index 9a7e54234..4a9425f84 100644 --- a/qcsrc/common/minigames/minigame/pp.qc +++ b/qcsrc/common/minigames/minigame/pp.qc @@ -368,7 +368,7 @@ void pp_hud_board(vector pos, vector mySize) sprintf(_("%s^7 won the game!"), pname), winfs, 0, DRAWFLAG_NORMAL, 0.5); - drawfill(win_pos-eY*hud_fontsize_y,win_sz+2*eY*hud_fontsize_y,'1 1 1',0.5,DRAWFLAG_ADDITIVE); + drawfill(win_pos-eY*hud_fontsize_y,win_sz+2*eY*hud_fontsize_y,'1 1 1',0.5*panel_fg_alpha,DRAWFLAG_ADDITIVE); minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos, sprintf(_("%s^7 won the game!"), pname), @@ -399,9 +399,9 @@ void pp_hud_status(vector pos, vector mySize) mypos = pos; if ( (active_minigame.minigame_flags&PP_TURN_TEAM) == 2 ) mypos_y += player_fontsize_y + ts_y; - drawfill(mypos,eX*mySize_x+eY*player_fontsize_y,'1 1 1',0.5,DRAWFLAG_ADDITIVE); + drawfill(mypos,eX*mySize_x+eY*player_fontsize_y,'1 1 1',0.5*panel_fg_alpha,DRAWFLAG_ADDITIVE); mypos_y += player_fontsize_y; - drawfill(mypos,eX*mySize_x+eY*tile_size_y,'1 1 1',0.25,DRAWFLAG_ADDITIVE); + drawfill(mypos,eX*mySize_x+eY*tile_size_y,'1 1 1',0.25*panel_fg_alpha,DRAWFLAG_ADDITIVE); } entity e; diff --git a/qcsrc/common/minigames/minigame/ps.qc b/qcsrc/common/minigames/minigame/ps.qc index 97bdfa612..ff8da7e09 100644 --- a/qcsrc/common/minigames/minigame/ps.qc +++ b/qcsrc/common/minigames/minigame/ps.qc @@ -425,7 +425,7 @@ void ps_hud_board(vector pos, vector mySize) strcat(_("Game over!"), " ", remaining_text), winfs, 0, DRAWFLAG_NORMAL, 0.5); - drawfill(win_pos-eY*hud_fontsize_y,win_sz+2*eY*hud_fontsize_y,'1 1 1',0.5,DRAWFLAG_ADDITIVE); + drawfill(win_pos-eY*hud_fontsize_y,win_sz+2*eY*hud_fontsize_y,'1 1 1',0.5*panel_fg_alpha,DRAWFLAG_ADDITIVE); minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos, strcat(_("Game over!"), " ", remaining_text), @@ -454,9 +454,9 @@ void ps_hud_status(vector pos, vector mySize) if(minigame_self.team != PS_SPECTATOR_TEAM) { mypos = pos; - drawfill(mypos,eX*mySize_x+eY*player_fontsize_y,'1 1 1',0.5,DRAWFLAG_ADDITIVE); + drawfill(mypos,eX*mySize_x+eY*player_fontsize_y,'1 1 1',0.5*panel_fg_alpha,DRAWFLAG_ADDITIVE); mypos_y += player_fontsize_y; - drawfill(mypos,eX*mySize_x+eY*tile_size_y,'1 1 1',0.25,DRAWFLAG_ADDITIVE); + drawfill(mypos,eX*mySize_x+eY*tile_size_y,'1 1 1',0.25*panel_fg_alpha,DRAWFLAG_ADDITIVE); } int remaining = 0; -- 2.39.2