]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Minigames: apply panel alpha to highlights too
authorterencehill <piuntn@gmail.com>
Sun, 27 Aug 2023 09:08:40 +0000 (11:08 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 27 Aug 2023 09:08:40 +0000 (11:08 +0200)
qcsrc/common/minigames/cl_minigames_hud.qc
qcsrc/common/minigames/minigame/bd.qc
qcsrc/common/minigames/minigame/c4.qc
qcsrc/common/minigames/minigame/nmm.qc
qcsrc/common/minigames/minigame/pong.qc
qcsrc/common/minigames/minigame/pp.qc
qcsrc/common/minigames/minigame/ps.qc

index 973ca428ab59b487c878a0f899220d4c028ba4d3..174bec63a91a309633b80a84f759707b5bf77ec1 100644 (file)
@@ -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;
        }
index 635d1b8d5328e7dfcdb34582f4ac887d4fa67e8b..9c56247af4ee8c2368e7feddf9ab3e7d34f50568 100644 (file)
@@ -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;
index 142e50c89fe2999f5e3f7f24097f4762bbaad613..7e6407bf3d12a4b5c32f2b9cdb2b47bbdca248e8 100644 (file)
@@ -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;
index ea7f3b42c76e97626100b7207f65b579a5b645c4..b550f79a35d21de9efba4723986397f46d18ded5 100644 (file)
@@ -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)
index 698ccfb555a05ce2629d6a1bc4cb5b4faee357a6..4acad766cb4e5336a9f06fbbd7e9da5f4e786090 100644 (file)
@@ -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")),
index 9a7e54234d7bab0aa48aa57c811123fd872b400e..4a9425f84f3446f0133276ea4d26480b49f7bf9e 100644 (file)
@@ -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;
index 97bdfa6124b686c4dd466a9bc3faee686d1db98e..ff8da7e09cae8d30c65a9d1d4028c3d730af116f 100644 (file)
@@ -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;