draw_Fill('0 0 0', '1 1 0', SKINCOLOR_MAPLIST_INCLUDEDBG, SKINALPHA_MAPLIST_INCLUDEDBG);
s = ftos(p);
- draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", MapInfo_Map_bspname), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
+ if(draw_PictureSize(strcat("/maps/", MapInfo_Map_bspname)) == '0 0 0')
+ draw_Picture(me.columnPreviewOrigin * eX, "nopreview_map", me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
+ else
+ draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", MapInfo_Map_bspname), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
+
if(included)
draw_Picture(me.checkMarkOrigin, "checkmark", me.checkMarkSize, '1 1 1', 1);
- s = draw_TextShortenToWidth(strcat(MapInfo_Map_bspname, ": ", MapInfo_Map_title), me.columnNameSize, 0, me.realFontSize);
+ s = draw_TextShortenToWidth(strdecolorize(MapInfo_Map_titlestring), me.columnNameSize, 0, me.realFontSize);
draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, SKINCOLOR_MAPLIST_TITLE, theAlpha, 0);
- s = draw_TextShortenToWidth(MapInfo_Map_author, me.columnNameSize, 0, me.realFontSize);
+ s = draw_TextShortenToWidth(strdecolorize(MapInfo_Map_author), me.columnNameSize, 0, me.realFontSize);
draw_Text(me.realUpperMargin2 * eY + (me.columnNameOrigin + 1.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, SKINCOLOR_MAPLIST_AUTHOR, theAlpha, 0);
MapInfo_ClearTemps();
{
float i;
string s;
- MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, MAPINFO_FLAG_FORBIDDEN, 0); // all
+ MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, MAPINFO_FLAG_FORBIDDEN | MAPINFO_FLAG_HIDDEN, 0); // all
s = "";
for(i = 0; i < MapInfo_count; ++i)
s = strcat(s, " ", MapInfo_BSPName_ByID(i));
m = MapInfo_BSPName_ByID(i);
if not(m)
{
- print("Huh? Can't play this (m is NULL). Refiltering so this won't happen again.\n");
+ print(_("Huh? Can't play this (m is NULL). Refiltering so this won't happen again.\n"));
+ me.refilter(me);
return;
}
if(MapInfo_CheckMap(m))
{
localcmd("\nmenu_loadmap_prepare\n");
if(cvar("menu_use_default_hostname"))
- localcmd("hostname \"", strdecolorize(cvar_string("_cl_name")), "'s Xonotic server\"\n");
- MapInfo_LoadMap(m);
+ localcmd("hostname \"", sprintf(_("%s's Xonotic Server"), strdecolorize(cvar_string("_cl_name"))), "\"\n");
+ MapInfo_LoadMap(m, 1);
}
else
{
- print("Huh? Can't play this (invalid game type). Refiltering so this won't happen again.\n");
+ print(_("Huh? Can't play this (invalid game type). Refiltering so this won't happen again.\n"));
me.refilter(me);
+ return;
}
}
float XonoticMapList_keyDown(entity me, float scan, float ascii, float shift)
{
string ch, save;
+ if(me.nItems <= 0)
+ return SUPER(XonoticMapList).keyDown(me, scan, ascii, shift);
if(scan == K_ENTER || scan == K_KP_ENTER)
{
// pop up map info screen