]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Improvements to colorset cvars (just show the numbers, not ^ too)
authorSamual Lenks <samual@xonotic.org>
Thu, 7 Feb 2013 08:02:58 +0000 (03:02 -0500)
committerSamual Lenks <samual@xonotic.org>
Thu, 7 Feb 2013 08:02:58 +0000 (03:02 -0500)
_hud_common.cfg
qcsrc/common/util.qh

index 0cada5f8906a6412504f88a20108172cf867b7dd..1a412f399b68db993f38f76f3f6f968a16dac127 100644 (file)
@@ -8,14 +8,14 @@ seta hud_configure_grid_alpha 0.15 "alpha for visible grid when in configure mod
 seta hud_fontsize 11 "text fontsize for the hud"
 seta hud_width 560 "2D virtual width for the hud"
 
-seta hud_colorset_foreground_1 "^2" "primary priority (important names, etc)"
-seta hud_colorset_foreground_2 "^3" "secondary priority (items, locations, numbers, etc)"
-seta hud_colorset_foreground_3 "^4" "tertiary priority or relatively inconsequential text"
-seta hud_colorset_foreground_4 "^1" "notice/attention grabbing texting"
-seta hud_colorset_kill_1 "^1" "'bad' or 'dangerous' text (death messages against you, kill notifications, etc)"
-seta hud_colorset_kill_2 "^3" "similar to above, but less important... OR, a highlight out of above message type"
-seta hud_colorset_kill_3 "^4" "'good' or 'beneficial' text (you fragging someone, etc)"
-seta hud_colorset_background "^7" "neutral/unimportant text"
+seta hud_colorset_foreground_1 "2" "primary priority (important names, etc)"
+seta hud_colorset_foreground_2 "3" "secondary priority (items, locations, numbers, etc)"
+seta hud_colorset_foreground_3 "4" "tertiary priority or relatively inconsequential text"
+seta hud_colorset_foreground_4 "1" "notice/attention grabbing texting"
+seta hud_colorset_kill_1 "1" "'bad' or 'dangerous' text (death messages against you, kill notifications, etc)"
+seta hud_colorset_kill_2 "3" "similar to above, but less important... OR, a highlight out of above message type"
+seta hud_colorset_kill_3 "4" "'good' or 'beneficial' text (you fragging someone, etc)"
+seta hud_colorset_background "7" "neutral/unimportant text"
 
 // general hud panel cvars (i.e. shouldn't be adjusted by a skin config)
 seta hud_panel_weapons_ammo_full_shells 60 "show 100% of the status bar at this ammo count"
index 9b63cbda7b3e513fada321027e71bbc6a90aaa08..9d071fd718c661eef4fe2d5c01abaaf91071c2fd 100644 (file)
@@ -383,23 +383,23 @@ void backtrace(string msg);
 
 // color code replace, place inside of sprintf and parse the string... defaults described as constants
 // foreground/normal colors
-var string autocvar_hud_colorset_foreground_1 = "^2"; // F1 - Green  // primary priority (important names, etc)
-var string autocvar_hud_colorset_foreground_2 = "^3"; // F2 - Yellow // secondary priority (items, locations, numbers, etc)
-var string autocvar_hud_colorset_foreground_3 = "^4"; // F3 - Blue   // tertiary priority or relatively inconsequential text
-var string autocvar_hud_colorset_foreground_4 = "^1"; // F4 - Red    // notice/attention grabbing texting
+var string autocvar_hud_colorset_foreground_1 = "2"; // F1 - Green  // primary priority (important names, etc)
+var string autocvar_hud_colorset_foreground_2 = "3"; // F2 - Yellow // secondary priority (items, locations, numbers, etc)
+var string autocvar_hud_colorset_foreground_3 = "4"; // F3 - Blue   // tertiary priority or relatively inconsequential text
+var string autocvar_hud_colorset_foreground_4 = "1"; // F4 - Red    // notice/attention grabbing texting
 // "kill" colors
-var string autocvar_hud_colorset_kill_1 = "^1"; // K1 - Red    // "bad" or "dangerous" text (death messages against you, kill notifications, etc)
-var string autocvar_hud_colorset_kill_2 = "^3"; // K2 - Yellow // similar to above, but less important... OR, a highlight out of above message type
-var string autocvar_hud_colorset_kill_3 = "^4"; // K3 - Blue   // "good" or "beneficial" text (you fragging someone, etc)
+var string autocvar_hud_colorset_kill_1 = "1"; // K1 - Red    // "bad" or "dangerous" text (death messages against you, kill notifications, etc)
+var string autocvar_hud_colorset_kill_2 = "3"; // K2 - Yellow // similar to above, but less important... OR, a highlight out of above message type
+var string autocvar_hud_colorset_kill_3 = "4"; // K3 - Blue   // "good" or "beneficial" text (you fragging someone, etc)
 // background color
-var string autocvar_hud_colorset_background = "^7"; // BG - White // neutral/unimportant text
-
-#define CCR(input) strreplace("^F1", autocvar_hud_colorset_foreground_1, \
-       strreplace("^F2", autocvar_hud_colorset_foreground_2, \
-       strreplace("^F3", autocvar_hud_colorset_foreground_3, \
-       strreplace("^F4", autocvar_hud_colorset_foreground_4, \
-       strreplace("^K1", autocvar_hud_colorset_kill_1, \
-       strreplace("^K2", autocvar_hud_colorset_kill_2, \
-       strreplace("^K3", autocvar_hud_colorset_kill_3, \
-       strreplace("^BG", autocvar_hud_colorset_background, \
+var string autocvar_hud_colorset_background = "7"; // BG - White // neutral/unimportant text
+
+#define CCR(input) strreplace("^F1", strcat("^", autocvar_hud_colorset_foreground_1), \
+       strreplace("^F2", strcat("^", autocvar_hud_colorset_foreground_2), \
+       strreplace("^F3", strcat("^", autocvar_hud_colorset_foreground_3), \
+       strreplace("^F4", strcat("^", autocvar_hud_colorset_foreground_4), \
+       strreplace("^K1", strcat("^", autocvar_hud_colorset_kill_1), \
+       strreplace("^K2", strcat("^", autocvar_hud_colorset_kill_2), \
+       strreplace("^K3", strcat("^", autocvar_hud_colorset_kill_3), \
+       strreplace("^BG", strcat("^", autocvar_hud_colorset_background), \
        strreplace("^N", "^7", input)))))))))