From: MirceaKitsune Date: Fri, 25 Nov 2011 17:33:36 +0000 (+0200) Subject: Code a missing preview image for menu skins too, so that the set is completed X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=15d81b6000b2fa1d36c7ae62063f52fc348536df;p=voretournament%2Fvoretournament.git Code a missing preview image for menu skins too, so that the set is completed --- diff --git a/data/qcsrc/menu/voret/skinlist.c b/data/qcsrc/menu/voret/skinlist.c index 0f87a6a5..83d68323 100644 --- a/data/qcsrc/menu/voret/skinlist.c +++ b/data/qcsrc/menu/voret/skinlist.c @@ -104,7 +104,10 @@ void getSkinsVoretSkinList(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(s, FILE_READ); if(fh < 0) {