]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/util.qh
Make the CCR() color replacement function common and add the cvars for it
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / util.qh
index 953d3276471c158d33e4aa484f16f958cce7ae46..6b1e5d39a3fd6f1f91dedc75f11371680afb6c47 100644 (file)
@@ -375,3 +375,21 @@ void FindConnectedComponent(entity e, .entity fld, findNextEntityNearFunction_t
 
 // expand multiple arguments into one argument by stripping parenthesis
 #define XPD(...) __VA_ARGS__
+
+float Count_Proper_Strings(string improper, string...count);
+float Count_Proper_Floats(float improper, float...count);
+
+void backtrace(string msg);
+
+// color code replace, place inside of sprintf and parse the string
+// defaults described as comments
+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_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_background = "^7"; // BG - White // neutral/unimportant text
+
+string CCR(string input);