add macros for color codes
This commit is contained in:
parent
a75c01c302
commit
eba67d69ca
@ -23,6 +23,17 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define CONSOLE_ESC(x) "\x1b[" #x
|
||||||
|
#define CONSOLE_RESET CONSOLE_ESC(0m)
|
||||||
|
#define CONSOLE_BLACK CONSOLE_ESC(30m)
|
||||||
|
#define CONSOLE_RED CONSOLE_ESC(31;1m)
|
||||||
|
#define CONSOLE_GREEN CONSOLE_ESC(32;1m)
|
||||||
|
#define CONSOLE_YELLOW CONSOLE_ESC(33;1m)
|
||||||
|
#define CONSOLE_BLUE CONSOLE_ESC(34;1m)
|
||||||
|
#define CONSOLE_MAGENTA CONSOLE_ESC(35;1m)
|
||||||
|
#define CONSOLE_CYAN CONSOLE_ESC(36;1m)
|
||||||
|
#define CONSOLE_WHITE CONSOLE_ESC(37;1m)
|
||||||
|
|
||||||
/// A callback for printing a character.
|
/// A callback for printing a character.
|
||||||
typedef bool(*ConsolePrint)(void* con, int c);
|
typedef bool(*ConsolePrint)(void* con, int c);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user