--- a/sources/interface.cpp Mon Jan 11 01:56:32 2016 +0200 +++ b/sources/interface.cpp Mon Jan 11 02:14:33 2016 +0200 @@ -185,12 +185,12 @@ int bg = (j == DEFAULT) ? defaultBg : j; if (::init_pair (pairnum, fg, bg) == ERR) - print ("Unable to initialize color pair %d (%d, %d)\n", pairnum, fg, bg); + print_warning ("Unable to initialize color pair %d (%d, %d)\n", pairnum, fg, bg); } } else { - print ("This terminal does not appear to support colors.\n"); + print_warning ("This terminal does not appear to support colors.\n"); } render_full(); @@ -527,7 +527,8 @@ if (not text.is_empty()) text += " | "; - text += "Ctrl+N to connect, Ctrl+Q to quit"; + text += "Ctrl+N to connect, Ctrl+Q to "; + text += (Session.state() == RCON_DISCONNECTED) ? "quit" : "disconnect"; if (text != StatusBarText) { @@ -917,11 +918,23 @@ // ------------------------------------------------------------------------------------------------- // +void __cdecl Interface::print_text (const char* fmtstr, ...) +{ + va_list args; + va_start (args, fmtstr); + vprint (fmtstr, args); + va_end (args); +} + +// ------------------------------------------------------------------------------------------------- +// void __cdecl Interface::print (const char* fmtstr, ...) { va_list args; va_start (args, fmtstr); + print_to_console (TEXTCOLOR_BrightBlue); vprint (fmtstr, args); + print_to_console (TEXTCOLOR_Reset); va_end (args); } @@ -1084,7 +1097,7 @@ throw Exitception(); } else - print_error("Unknown command %s\n", command.chars()); + print_error("Unknown command: %s\n", command.chars()); } // -------------------------------------------------------------------------------------------------