mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Adding print_rich for printing with BBCode
This commit is contained in:
parent
622b656c40
commit
c6291bcd8a
16 changed files with 232 additions and 16 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue