sources/format.h

changeset 70
0e947b487b18
parent 69
eb4c25284a19
child 72
1b9c53e0c846
--- a/sources/format.h	Mon May 04 15:51:03 2015 +0300
+++ b/sources/format.h	Mon May 04 18:16:05 2015 +0300
@@ -213,3 +213,23 @@
 {
 	print_to_console (format (fmtstr, args...));
 }
+
+// -------------------------------------------------------------------------------------------------
+//
+// Prints the formatting result as a warning to the console
+//
+template<typename... argtypes>
+void print_warning (const String& fmtstr, const argtypes&... args)
+{
+	print_to_console (TEXTCOLOR_BrightYellow "-!- " + format (fmtstr, args...) + TEXTCOLOR_Reset);
+}
+
+// -------------------------------------------------------------------------------------------------
+//
+// Prints the formatting result as a warning to the console
+//
+template<typename... argtypes>
+void print_error (const String& fmtstr, const argtypes&... args)
+{
+	print_to_console (TEXTCOLOR_BrightRed "!!! " + format (fmtstr, args...) + TEXTCOLOR_Reset);
+}
\ No newline at end of file

mercurial