From 15d81b6000b2fa1d36c7ae62063f52fc348536df Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Fri, 25 Nov 2011 19:33:36 +0200 Subject: [PATCH] Code a missing preview image for menu skins too, so that the set is completed --- data/qcsrc/menu/voret/skinlist.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) { -- 2.39.2