#include "quickmenu.qh"
-#include "hud.qh"
-#include "hud_config.qh"
+#include "hud/all.qh"
#include "mapvoting.qh"
// QUICKMENU_MAXLINES must be <= 10
if(mode == "file")
{
if(autocvar_hud_panel_quickmenu_file == "" || autocvar_hud_panel_quickmenu_file == "0")
- printf("No file name is set in hud_panel_quickmenu_file, loading default quickmenu\n");
+ LOG_INFO("No file name is set in hud_panel_quickmenu_file, loading default quickmenu\n");
else
{
fh = fopen(autocvar_hud_panel_quickmenu_file, FILE_READ);
if(fh < 0)
- printf("Couldn't open file \"%s\", loading default quickmenu\n", autocvar_hud_panel_quickmenu_file);
+ LOG_INFOF("Couldn't open file \"%s\", loading default quickmenu\n", autocvar_hud_panel_quickmenu_file);
}
if(fh < 0)
mode = "default";
}
else
{
- printf("Unrecognized mode %s\n", mode);
+ LOG_WARNINGF("Unrecognized mode %s\n", mode);
return false;
}
// printf("^1 skipping %s\n", s);
}
if(QuickMenu_Buffer_Index == QuickMenu_Buffer_Size)
- printf("Couldn't find submenu \"%s\"\n", z_submenu);
+ LOG_WARNINGF("Couldn't find submenu \"%s\"\n", z_submenu);
}
// only the last page can contain up to QUICKMENU_MAXLINES entries
}
}
- vector cursorsize = '32 32 0';
- drawpic(mousepos, strcat("gfx/menu/", autocvar_menu_skin, "/cursor.tga"), cursorsize, '1 1 1', 0.8, DRAWFLAG_NORMAL);
+ draw_cursor_normal(mousepos, '1 1 1', 0.8);
prevMouseClicked = mouseClicked;
}
drawcolorcodedstring(pos, entry, fontsize, panel_fg_alpha, DRAWFLAG_ADDITIVE);
}
-void HUD_QuickMenu(void)
+void HUD_QuickMenu()
{
if(!autocvar__hud_configure)
{
continue;
if(without_me && pl.sv_entnum == player_localnum)
continue;
- QUICKMENU_ENTRY(GetPlayerName(pl.sv_entnum), sprintf(cmd, GetPlayerName(pl.sv_entnum)))
+ QUICKMENU_ENTRY(entcs_GetName(pl.sv_entnum), sprintf(cmd, entcs_GetName(pl.sv_entnum)))
}
return;
QUICKMENU_SMENU(CTX(_("QMCMD^Call a vote")), "Call a vote")
QUICKMENU_ENTRY(CTX(_("QMCMD^Restart the map")), "vcall restart")
QUICKMENU_ENTRY(CTX(_("QMCMD^End match")), "vcall endmatch")
- if(getstatf(STAT_TIMELIMIT) > 0)
+ if(STAT(TIMELIMIT) > 0)
{
QUICKMENU_ENTRY(CTX(_("QMCMD^Reduce match time")), "vcall reducematchtime")
QUICKMENU_ENTRY(CTX(_("QMCMD^Extend match time")), "vcall extendmatchtime")
if(target_submenu != "" && !target_submenu_found)
{
- printf("Couldn't find submenu \"%s\"\n", target_submenu);
+ LOG_WARNINGF("Couldn't find submenu \"%s\"\n", target_submenu);
if(prvm_language != "en")
- printf("^3Warning: submenu must be in English\n", target_submenu);
+ LOG_WARNINGF("^3Warning: submenu must be in English\n", target_submenu);
QuickMenu_Buffer_Size = 0;
}
}