From: Mircea Kitsune Date: Fri, 25 Nov 2011 17:34:10 +0000 (+0200) Subject: Code a missing preview image for menu skins too, so that the set is completed X-Git-Tag: xonotic-v0.6.0~188^2~16^2~3^2~12 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f6f594805c9ef77caca667c30912ea9af4656a4f;p=xonotic%2Fxonotic-data.pk3dir.git Code a missing preview image for menu skins too, so that the set is completed --- diff --git a/qcsrc/menu/xonotic/skinlist.c b/qcsrc/menu/xonotic/skinlist.c index bb01f974c..5fcd35435 100644 --- a/qcsrc/menu/xonotic/skinlist.c +++ b/qcsrc/menu/xonotic/skinlist.c @@ -104,7 +104,10 @@ void XonoticSkinList_getSkins(entity me) bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_NAME, substring(s, 9, strlen(s) - 24)); // the * part bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_TITLE, _("")); bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_AUTHOR, _("<AUTHOR>")); - bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_PREVIEW, strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview")); + if(draw_PreloadPicture(strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview")) == "") + bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_PREVIEW, "nopreview_skin"); + else + bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_PREVIEW, strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview")); fh = fopen(language_filename(s), FILE_READ); if(fh < 0) {