sources/interface.h

changeset 83
08bfc3d9d2ae
parent 73
07dda51a7a8e
child 84
3bd32eec3d57
child 88
08ccaf26cffd
equal deleted inserted replaced
82:895088452014 83:08bfc3d9d2ae
55 void set_player_names (const StringList& names); 55 void set_player_names (const StringList& names);
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 59
60 template<typename... argtypes> 60 void vprint (const char* fmtstr, va_list args);
61 void print (const String& fmtstr, const argtypes&... args) 61 void __cdecl print (const char* fmtstr, ...);
62 { 62 void __cdecl print_warning (const char* fmtstr, ...);
63 print_to_console (format (fmtstr, args...)); 63 void __cdecl print_error (const char* fmtstr, ...);
64 }
65
66 template<typename... argtypes>
67 void print_warning (const String& fmtstr, const argtypes&... args)
68 {
69 print_to_console (TEXTCOLOR_BrightYellow "-!- " + format (fmtstr, args...) + TEXTCOLOR_Reset);
70 }
71
72 template<typename... argtypes>
73 void print_error (const String& fmtstr, const argtypes&... args)
74 {
75 print_to_console (TEXTCOLOR_BrightRed "!!! " + format (fmtstr, args...) + TEXTCOLOR_Reset);
76 }
77 64
78 private: 65 private:
79 StringList InputHistory; 66 StringList InputHistory;
80 int InputCursor = 0; 67 int InputCursor = 0;
81 int CursorPosition = 0; 68 int CursorPosition = 0;

mercurial