}
bool draw_allowed = false;
- if (active_minigame && HUD_MinigameMenu_IsOpened())
+ if (scoreboard_fade_alpha && panel.panel_showflags & PANEL_SHOW_WITH_SB)
+ {
+ draw_allowed = true;
+ }
+ else if (active_minigame && HUD_MinigameMenu_IsOpened())
{
if (panel.panel_showflags & PANEL_SHOW_MINIGAME)
draw_allowed = true;
if (draw_allowed)
{
if (panel.panel_showflags & PANEL_SHOW_WITH_SB)
- panel_fade_alpha = 1;
+ {
+ if (scoreboard_fade_alpha && intermission == 2 && !(panel.panel_showflags & PANEL_SHOW_MAPVOTE))
+ panel_fade_alpha = scoreboard_fade_alpha;
+ else
+ panel_fade_alpha = 1;
+ }
else
{
panel_fade_alpha = 1 - scoreboard_fade_alpha;
void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag);
.int panel_showflags;
-const int PANEL_SHOW_NEVER = 0x00;
-const int PANEL_SHOW_MAINGAME = 0x01;
-const int PANEL_SHOW_MINIGAME = 0x02;
-const int PANEL_SHOW_MAPVOTE = 0x04;
-const int PANEL_SHOW_WITH_SB = 0x08;
-const int PANEL_SHOW_ALWAYS = 0xff;
+const int PANEL_SHOW_MAINGAME = BIT(0); // show in the main HUD
+const int PANEL_SHOW_MINIGAME = BIT(1); // show when minigames panels are shown
+const int PANEL_SHOW_MAPVOTE = BIT(2); // show during map vote
+const int PANEL_SHOW_WITH_SB = BIT(3); // show when scoreboard is on
.int panel_configflags;
const int PANEL_CONFIG_NO = 0x00;
REGISTER_HUD_PANEL(MINIGAMEBOARD, HUD_MinigameBoard, PANEL_CONFIG_NO , PANEL_SHOW_MINIGAME | PANEL_SHOW_WITH_SB) // MINIGAMEBOARD
REGISTER_HUD_PANEL(MINIGAMESTATUS, HUD_MinigameStatus, PANEL_CONFIG_NO , PANEL_SHOW_MINIGAME | PANEL_SHOW_WITH_SB) // MINIGAMESTATUS
REGISTER_HUD_PANEL(MINIGAMEHELP, HUD_MinigameHelp, PANEL_CONFIG_NO , PANEL_SHOW_MINIGAME | PANEL_SHOW_WITH_SB) // MINIGAMEHELP
-REGISTER_HUD_PANEL(MINIGAMEMENU, HUD_MinigameMenu, PANEL_CONFIG_NO , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // MINIGAMEMENU
+REGISTER_HUD_PANEL(MINIGAMEMENU, HUD_MinigameMenu, PANEL_CONFIG_NO , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_WITH_SB) // MINIGAMEMENU
REGISTER_HUD_PANEL(MAPVOTE, MapVote_Draw, PANEL_CONFIG_NO , PANEL_SHOW_MAPVOTE ) // MAPVOTE
REGISTER_HUD_PANEL(ITEMSTIME, HUD_ItemsTime, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME ) // ITEMSTIME
REGISTER_HUD_PANEL(QUICKMENU, HUD_QuickMenu, PANEL_CONFIG_MAIN , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME ) // QUICKMENU
// Draws the minigame game board
void HUD_MinigameBoard ()
{
+ if (!HUD_MinigameMenu_IsOpened())
+ return;
+
entity hud_minigame = NULL;
if(!autocvar__hud_configure)
// Draws the minigame status panel
void HUD_MinigameStatus ()
{
+ if (!HUD_MinigameMenu_IsOpened())
+ return;
+
entity hud_minigame = NULL;
if(!autocvar__hud_configure)
// Open the minigame menu panel
void HUD_MinigameMenu_Open()
{
- if ( !HUD_MinigameMenu_IsOpened() )
+ if ( !mv_active && !HUD_MinigameMenu_IsOpened() )
{
HUD_MinigameMenu_InsertEntry( HUD_MinigameMenu_SpawnEntry(
_("Create"), '0 0 0', hud_fontsize*1.5,'0.7 0.84 1', HUD_MinigameMenu_ClickCreate),
// Minigame menu panel UI
void HUD_MinigameMenu ()
{
+ if (mv_active)
+ {
+ if (HUD_MinigameMenu_IsOpened())
+ HUD_MinigameMenu_Close(NULL, NULL, NULL);
+ return;
+ }
+
if ( !HUD_MinigameMenu_IsOpened() )
return;
void HUD_MinigameHelp()
{
+ if (!HUD_MinigameMenu_IsOpened())
+ return;
+
string help_message;
if(!autocvar__hud_configure)