return v;
}
-void draw_PreloadPicture(string pic)
+string draw_PreloadPicture(string pic)
{
pic = draw_UseSkinFor(pic);
- precache_pic(pic);
+ return precache_pic(pic);
}
void draw_Picture(vector theOrigin, string pic, vector theSize, vector theColor, float theAlpha)
void draw_setMousePointer(string pic, vector theSize, vector theOffset);
void draw_drawMousePointer(vector where);
-void draw_PreloadPicture(string pic);
+string draw_PreloadPicture(string pic);
void draw_ButtonPicture(vector theOrigin, string pic, vector theSize, vector theColor, float theAlpha);
void draw_VertButtonPicture(vector theOrigin, string pic, vector theSize, vector theColor, float theAlpha);
void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector theColor, float theAlpha, vector theBorderSize);
draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
s = ftos(p);
- if(precache_pic(strcat("maps/", campaign_mapname[i])) == "")
+ if(draw_PreloadPicture(strcat("/maps/", campaign_mapname[i])) == "")
draw_Picture(me.columnPreviewOrigin * eX, "nopreview_map", me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
else
draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", campaign_mapname[i]), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
me.authorLabel.setText(me.authorLabel, me.currentMapAuthor);
me.descriptionLabel.setText(me.descriptionLabel, me.currentMapDescription);
me.featuresLabel.setText(me.featuresLabel, me.currentMapFeaturesText);
- if(precache_pic(strcat("maps/", currentMapPreviewImage)) == "")
+ if(draw_PreloadPicture(me.currentMapPreviewImage) == "")
me.previewImage.src = "nopreview_map";
else
me.previewImage.src = me.currentMapPreviewImage;
draw_Fill('0 0 0', '1 1 0', SKINCOLOR_MAPLIST_INCLUDEDBG, SKINALPHA_MAPLIST_INCLUDEDBG);
s = ftos(p);
- if(precache_pic(strcat("maps/", MapInfo_Map_bspname)) == "")
+ if(draw_PreloadPicture(strcat("/maps/", MapInfo_Map_bspname)) == "")
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);
me.currentModelDescription = strzone(bufstr_get(me.bufModels, BUFMODELS_COUNT*me.idxModels+BUFMODELS_DESC));
// fix the image
- if(precache_pic(strcat(me.currentModel, "_", ftos(me.currentSkin))) == "")
- me.src = me.currentModelImage;
+ if(draw_PreloadPicture(me.currentModelImage) == "")
+ me.src = "nopreview_player";
else
- me.src = draw_UseSkinFor("nopreview_player");
+ me.src = me.currentModelImage;
me.updateAspect(me);
}