]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Code a missing preview image for menu skins too, so that the set is completed
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 25 Nov 2011 17:33:36 +0000 (19:33 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 25 Nov 2011 17:33:36 +0000 (19:33 +0200)
data/qcsrc/menu/voret/skinlist.c

index 0f87a6a51d52b9046a729a8bb0b6cedc3760cc52..83d68323a3a264afb3b003338e68fedf6e95996d 100644 (file)
@@ -104,7 +104,10 @@ void getSkinsVoretSkinList(entity me)
                bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_NAME, substring(s, 9, strlen(s) - 24)); // the * part\r
                bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_TITLE, "<TITLE>");\r
                bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_AUTHOR, "<AUTHOR>");\r
-               bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_PREVIEW, strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview"));\r
+               if(draw_PreloadPicture(strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview")) == "")\r
+                       bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_PREVIEW, "nopreview_skin");\r
+               else\r
+                       bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_PREVIEW, strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview"));\r
                fh = fopen(s, FILE_READ);\r
                if(fh < 0)\r
                {\r