void() m_init =
{
cvar_set("_menu_alpha", "0");
+ prvm_language = strzone(cvar_string("prvm_language"));
check_unacceptable_compiler_bugs();
#ifdef WATERMARK
- print("^4MQC Build information: ", WATERMARK(), "\n");
+ print(sprintf(_("^4MQC Build information: ^1%s\n"), WATERMARK()));
#endif
// list all game dirs (TEST)
if(cvar_string("menu_skin") != "")
{
draw_currentSkin = strcat("gfx/menu/", cvar_string("menu_skin"));
- fh = fopen(strcat(draw_currentSkin, "/skinvalues.txt"), FILE_READ);
+ fh = fopen(language_filename(strcat(draw_currentSkin, "/skinvalues.txt")), FILE_READ);
}
if(fh < 0)
if(cvar_defstring("menu_skin") != "")
{
draw_currentSkin = strcat("gfx/menu/", cvar_defstring("menu_skin"));
- fh = fopen(strcat(draw_currentSkin, "/skinvalues.txt"), FILE_READ);
+ fh = fopen(language_filename(strcat(draw_currentSkin, "/skinvalues.txt")), FILE_READ);
}
if(fh < 0)
{
draw_currentSkin = "gfx/menu/default";
- fh = fopen(strcat(draw_currentSkin, "/skinvalues.txt"), FILE_READ);
+ fh = fopen(language_filename(strcat(draw_currentSkin, "/skinvalues.txt")), FILE_READ);
}
draw_currentSkin = strzone(draw_currentSkin);
while((s = fgets(fh)))
vector avoidplus, avoidminus;
vector v;
- avoidplus_x = (SKINAVOID_TOOLTIP_x + SKINSIZE_CURSOR_x - SKINOFFSET_CURSOR_x) / conwidth;
- avoidplus_y = (SKINAVOID_TOOLTIP_y + SKINSIZE_CURSOR_y - SKINOFFSET_CURSOR_y) / conheight;
+ avoidplus_x = (SKINAVOID_TOOLTIP_x + SKINSIZE_CURSOR_x - SKINOFFSET_CURSOR_x * SKINSIZE_CURSOR_x) / conwidth;
+ avoidplus_y = (SKINAVOID_TOOLTIP_y + SKINSIZE_CURSOR_y - SKINOFFSET_CURSOR_y * SKINSIZE_CURSOR_y) / conheight;
avoidplus_z = 0;
- avoidminus_x = (SKINAVOID_TOOLTIP_x + SKINOFFSET_CURSOR_x) / conwidth + menuTooltipSize_x;
- avoidminus_y = (SKINAVOID_TOOLTIP_y + SKINOFFSET_CURSOR_y) / conheight + menuTooltipSize_y;
+ avoidminus_x = (SKINAVOID_TOOLTIP_x + SKINOFFSET_CURSOR_x * SKINSIZE_CURSOR_x) / conwidth + menuTooltipSize_x;
+ avoidminus_y = (SKINAVOID_TOOLTIP_y + SKINOFFSET_CURSOR_y * SKINSIZE_CURSOR_y) / conheight + menuTooltipSize_y;
avoidminus_z = 0;
// bottom right
if(Menu_Active)
if(!cvar("menu_video_played"))
{
- localcmd("set menu_video_played 1; cd loop $menu_cdtrack; play sound/announcer/default/welcome.ogg\n");
+ localcmd("cd loop $menu_cdtrack; play sound/announcer/default/welcome.ogg\n");
menuLogoAlpha = -0.8; // no idea why, but when I start this at zero, it jumps instead of fading FIXME
}
+ // ALWAYS set this cvar; if we start but menu is not active, this means we want no background music!
+ localcmd("set menu_video_played 1\n");
}
t = gettime();
}
else
{
- e = findstring(NULL, name, itemname);
+ for(e = NULL; (e = findstring(e, name, itemname)); )
+ if(e.classname != "vtbl")
+ break;
if(e)
{
m_hide();
m_goto("skinselector");
}
+void() m_goto_language_selector =
+{
+ if(!menuInitialized)
+ return;
+ // TODO add code to switch back to the language selector (no idea how to do it now)
+ m_goto("languageselector");
+}
+
void() m_goto_video_settings =
{
if(!menuInitialized)
return;
- // TODO add code to switch back to the skin selector (no idea how to do it now)
+ // TODO add code to switch back to the video settings (no idea how to do it now)
m_goto("videosettings");
}