hud_configure_prev = -1;
tab_panel = -1;
+
+ draw_currentSkin = strzone(strcat("gfx/menu/", cvar_string("menu_skin")));
}
// CSQC_Shutdown : Called every time the CSQC code is shutdown (changing maps, quitting, etc)
if(fexists(strcat(pic, ".jpg")) || fexists(strcat(pic, ".png")) || fexists(strcat(pic, ".tga")))
drawpic(pos, pic, img_size, '1 1 1', alpha, DRAWFLAG_NORMAL);
else
- drawpic(pos, "gfx/nopreview_map", img_size, '1 1 1', alpha, DRAWFLAG_NORMAL);
+ drawpic(pos, draw_UseSkinFor("nopreview_player"), img_size, '1 1 1', alpha, DRAWFLAG_NORMAL);
}
if(id == mv_ownvote)
#endif
#endif
+#ifndef SVQC
+string draw_UseSkinFor(string pic)
+{
+ if(substring(pic, 0, 1) == "/")
+ return substring(pic, 1, strlen(pic)-1);
+ else
+ return strcat(draw_currentSkin, "/", pic);
+}
+#endif
+
string unescape(string in)
{
float i, len;
#endif
void wordwrap_cb(string s, float l, void(string) callback)
+#ifndef SVQC
+string draw_currentSkin;
+string draw_UseSkinFor(string pic);
+#endif
+
float GameCommand_Generic(string cmd);
// returns TRUE if handled, FALSE otherwise
// tokenizes its input!
vector draw_mousepointer_offset;
vector draw_mousepointer_size;
-string draw_UseSkinFor(string pic)
-{
- if(substring(pic, 0, 1) == "/")
- return substring(pic, 1, strlen(pic)-1);
- else
- return strcat(draw_currentSkin, "/", pic);
-}
-
void draw_setMousePointer(string pic, vector theSize, vector theOffset)
{
draw_mousepointer = strzone(draw_UseSkinFor(pic));
float draw_NeedResizeNotify;
-string draw_currentSkin;
-
float draw_TextWidth_WithColors(string s, vector size);
float draw_TextWidth_WithoutColors(string s, vector size);
if(fexists(strcat("maps/", campaign_mapname[i], ".jpg")) || fexists(strcat("maps/", campaign_mapname[i], ".png")) || fexists(strcat("maps/", campaign_mapname[i], ".tga")))
draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", campaign_mapname[i]), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
else
- draw_Picture(me.columnPreviewOrigin * eX, "/gfx/nopreview_map", me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
+ draw_Picture(me.columnPreviewOrigin * eX, draw_UseSkinFor("nopreview_map"), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
if(i < me.campaignIndex)
draw_Picture(me.checkMarkOrigin, "checkmark", me.checkMarkSize, '1 1 1', 1);
if(fexists(strcat("maps/", me.currentMapPreviewImage, ".jpg")) || fexists(strcat("maps/", me.currentMapPreviewImage, ".png")) || fexists(strcat("maps/", me.currentMapPreviewImage, ".tga")))
me.previewImage.src = me.currentMapPreviewImage;
else
- me.previewImage.src = "/gfx/nopreview_map";
+ me.previewImage.src = draw_UseSkinFor("nopreview_player");
for(i = 0; i < GameType_GetCount(); ++i)
{
if(fexists(strcat("maps/", MapInfo_Map_bspname, ".jpg")) || fexists(strcat("maps/", MapInfo_Map_bspname, ".png")) || fexists(strcat("maps/", MapInfo_Map_bspname, ".tga")))
draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", MapInfo_Map_bspname), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
else
- draw_Picture(me.columnPreviewOrigin * eX, "/gfx/nopreview_map", me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
+ draw_Picture(me.columnPreviewOrigin * eX, draw_UseSkinFor("nopreview_map"), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
if(included)
draw_Picture(me.checkMarkOrigin, "checkmark", me.checkMarkSize, '1 1 1', 1);
if(fexists(strcat(me.currentModel, "_", ftos(me.currentSkin), ".jpg")) || fexists(strcat(me.currentModel, "_", ftos(me.currentSkin), ".png")) || fexists(strcat(me.currentModel, "_", ftos(me.currentSkin), ".tga")))
me.src = me.currentModelImage;
else
- me.src = "/gfx/nopreview_player";
+ me.src = draw_UseSkinFor("nopreview_player");
me.updateAspect(me);
}