TC(bool, new_page);
string s = string_null, cmd = string_null, z_submenu;
+ QuickMenu_Page_ActivatedEntry = -1;
if (new_page == 0)
QuickMenu_Page = 0;
else
if (QuickMenu_Page_Command[num] != "")
{
+ QuickMenu_Page_ActivatedEntry_Time = time + 0.1;
localcmd(strcat("\n", QuickMenu_Page_Command[num], "\n"));
QuickMenu_TimeOut = ((autocvar_hud_panel_quickmenu_time > 0) ? time + autocvar_hud_panel_quickmenu_time : 0);
return true;
{
TC(int, entry_num);
QuickMenu_Page_ActivatedEntry = entry_num;
- QuickMenu_Page_ActivatedEntry_Time = time + 0.1;
if(QuickMenu_Page_Command[QuickMenu_Page_ActivatedEntry])
{
bool f = QuickMenu_ActionForNumber(QuickMenu_Page_ActivatedEntry);
int entry_num = min(QuickMenu_Page_Entries - 1, floor((mousepos.y - first_entry_pos) / fontsize.y));
if (QuickMenu_IsLastPage || entry_num != QUICKMENU_MAXLINES - 2)
{
- // recycling panel_pos as entry_pos
- panel_pos.y = first_entry_pos + entry_num * fontsize.y;
- vector color;
- if(mouseClicked & S_MOUSE1)
- color = '0.5 1 0.5';
- else if(hudShiftState & S_CTRL)
- color = '1 1 0.3';
- else
- color = '1 1 1';
- drawfill(panel_pos, vec2(panel_size.x, fontsize.y), color, .2, DRAWFLAG_NORMAL);
-
if(!mouseClicked && (prevMouseClicked & S_MOUSE1))
QuickMenu_Page_ActiveEntry((entry_num < QUICKMENU_MAXLINES - 1) ? entry_num + 1 : 0);
+
+ if (time > QuickMenu_Page_ActivatedEntry_Time)
+ {
+ vector entry_pos = panel_pos;
+ entry_pos.y = first_entry_pos + entry_num * fontsize.y;
+ vector color;
+ if (mouseClicked & S_MOUSE1)
+ color = '0.5 1 0.5';
+ else if (hudShiftState & S_CTRL)
+ color = '1 1 0.3';
+ else
+ color = '1 1 1';
+ drawfill(entry_pos, vec2(panel_size.x, fontsize.y), color, .2, DRAWFLAG_NORMAL);
+ }
}
}
}
}
HUD_Quickmenu_DrawEntry(panel_pos, sprintf("%d: %s%s", i, color, QuickMenu_Page_Description[i]), option, fontsize);
- if(QuickMenu_Page_ActivatedEntry_Time && time < QuickMenu_Page_ActivatedEntry_Time
- && QuickMenu_Page_ActivatedEntry == i)
+ if (time < QuickMenu_Page_ActivatedEntry_Time && QuickMenu_Page_ActivatedEntry == i)
drawfill(panel_pos, vec2(panel_size.x, fontsize.y), '0.5 1 0.5', .2, DRAWFLAG_NORMAL);
panel_pos.y += fontsize.y;