r4018 - trunk/data/qcsrc/menu

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Aug 4 06:16:52 EDT 2008


Author: div0
Date: 2008-08-04 06:16:51 -0400 (Mon, 04 Aug 2008)
New Revision: 4018

Modified:
   trunk/data/qcsrc/menu/menu.qc
   trunk/data/qcsrc/menu/skin.qh
Log:
use the default string of the menu_skin cvar in preference to the hardcoded "default" if the skin is not found


Modified: trunk/data/qcsrc/menu/menu.qc
===================================================================
--- trunk/data/qcsrc/menu/menu.qc	2008-08-04 09:58:58 UTC (rev 4017)
+++ trunk/data/qcsrc/menu/menu.qc	2008-08-04 10:16:51 UTC (rev 4018)
@@ -69,6 +69,11 @@
 		draw_currentSkin = strcat("gfx/menu/", cvar_string("menu_skin"));
 		fh = fopen(strcat(draw_currentSkin, "/skinvalues.txt"), FILE_READ);
 	}
+	if(cvar_defstring("menu_skin") != "")
+	{
+		draw_currentSkin = strcat("gfx/menu/", cvar_defstring("menu_skin"));
+		fh = fopen(strcat(draw_currentSkin, "/skinvalues.txt"), FILE_READ);
+	}
 	if(fh < 0)
 	{
 		draw_currentSkin = "gfx/menu/default";

Modified: trunk/data/qcsrc/menu/skin.qh
===================================================================
--- trunk/data/qcsrc/menu/skin.qh	2008-08-04 09:58:58 UTC (rev 4017)
+++ trunk/data/qcsrc/menu/skin.qh	2008-08-04 10:16:51 UTC (rev 4018)
@@ -13,7 +13,7 @@
 #define SKINBEGIN void Skin_ApplySetting(string key, string value) { switch(key) {
 #define SKINVECTOR(name,def) case #name: SKIN##name = stov(value); break
 #define SKINFLOAT(name,def) case #name: SKIN##name = stof(value); break
-#define SKINSTRING(name,def)
+#define SKINSTRING(name,def) case #name: break
 #define SKINEND case "": break; case "//": break; default: print("Invalid key in skin file: ", key, "\n"); } }
 #include "skin-customizables.inc"
 #undef SKINEND




More information about the nexuiz-commits mailing list