| 56 void need_refresh(); |
56 void need_refresh(); |
| 57 void tab_complete (const String& part, String complete); |
57 void tab_complete (const String& part, String complete); |
| 58 RCONSession* get_session() { return &Session; } |
58 RCONSession* get_session() { return &Session; } |
| 59 void disconnected(); |
59 void disconnected(); |
| 60 |
60 |
| 61 template<typename... argtypes> |
61 void vprint (const char* fmtstr, va_list args); |
| 62 void print (const String& fmtstr, const argtypes&... args) |
62 void __cdecl print (const char* fmtstr, ...); |
| 63 { |
63 void __cdecl print_warning (const char* fmtstr, ...); |
| 64 print_to_console (format (fmtstr, args...)); |
64 void __cdecl print_error (const char* fmtstr, ...); |
| 65 } |
|
| 66 |
|
| 67 template<typename... argtypes> |
|
| 68 void print_warning (const String& fmtstr, const argtypes&... args) |
|
| 69 { |
|
| 70 print_to_console (TEXTCOLOR_BrightYellow "-!- " + format (fmtstr, args...) + TEXTCOLOR_Reset); |
|
| 71 } |
|
| 72 |
|
| 73 template<typename... argtypes> |
|
| 74 void print_error (const String& fmtstr, const argtypes&... args) |
|
| 75 { |
|
| 76 print_to_console (TEXTCOLOR_BrightRed "!!! " + format (fmtstr, args...) + TEXTCOLOR_Reset); |
|
| 77 } |
|
| 78 |
65 |
| 79 private: |
66 private: |
| 80 StringList InputHistory; |
67 StringList InputHistory; |
| 81 int InputCursor = 0; |
68 int InputCursor = 0; |
| 82 int CursorPosition = 0; |
69 int CursorPosition = 0; |