Adding print_rich for printing with BBCode

This commit is contained in:
Voylin 2022-05-03 08:29:38 +09:00
parent 622b656c40
commit c6291bcd8a
16 changed files with 232 additions and 16 deletions

View file

@ -100,6 +100,21 @@ void OS::print(const char *p_format, ...) {
va_end(argp);
}
void OS::print_rich(const char *p_format, ...) {
if (!_stdout_enabled) {
return;
}
va_list argp;
va_start(argp, p_format);
if (_logger) {
_logger->logv(p_format, argp, false);
}
va_end(argp);
}
void OS::printerr(const char *p_format, ...) {
if (!_stderr_enabled) {
return;

View file

@ -120,6 +120,7 @@ public:
void print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, bool p_editor_notify = false, Logger::ErrorType p_type = Logger::ERR_ERROR);
void print(const char *p_format, ...) _PRINTF_FORMAT_ATTRIBUTE_2_3;
void print_rich(const char *p_format, ...) _PRINTF_FORMAT_ATTRIBUTE_2_3;
void printerr(const char *p_format, ...) _PRINTF_FORMAT_ATTRIBUTE_2_3;
virtual String get_stdin_string(bool p_block = true) = 0;