bool auto_close_minigamemenu;
void deactivate_minigame()
{
- if ( !active_minigame )
+ if ( !active_minigame || active_minigame != self )
return;
-
active_minigame.minigame_event(active_minigame,"deactivate");
entity e = world;
while( (e = findentity(e, owner, self)) )
minigame_self = world;
active_minigame = world;
-
+
if ( auto_close_minigamemenu )
{
HUD_MinigameMenu_Close();
#include "minigames.qh"
#include "../../client/mapvoting.qh"
-float HUD_mouse_over(entity somepanel)
+// whether the mouse is over the given panel
+bool HUD_mouse_over(entity somepanel)
{
vector pos = stov(cvar_string(strcat("hud_panel_", somepanel.panel_name, "_pos")));
vector sz = stov(cvar_string(strcat("hud_panel_", somepanel.panel_name, "_size")));
// Minigame Board
// ====================================================================
+// Draws the minigame game board
void HUD_MinigameBoard ()
{
entity hud_minigame = world;
// ====================================================================
// Minigame Status
// ====================================================================
+// Draws the minigame status panel
void HUD_MinigameStatus ()
{
entity hud_minigame = world;
}
if ( self.list_next )
self.list_next.list_prev = self;
+ else
+ HUD_MinigameMenu_last_entry = self;
}
else
{
menumessage, HUD_MinigameMenu_ClickCustomEntry, parent );
e.netname = event_arg;
HUD_MinigameMenu_InsertEntry(e, parent);
- dprint("CustomEntry ",ftos(num_for_edict(parent))," ",menumessage," ",event_arg,"\n");
+ //dprint("CustomEntry ",ftos(num_for_edict(parent))," ",menumessage," ",event_arg,"\n");
}
// Click action for the Current Game menu
fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
}
-// minigame menu panel UI
+// Minigame menu panel UI
void HUD_MinigameMenu ()
{
if ( !HUD_MinigameMenu_IsOpened() )