Wed, 27 May 2015 21:15:52 +0300
Merged with default
sources/colors.h | file | annotate | diff | comparison | revisions | |
sources/format.cpp | file | annotate | diff | comparison | revisions | |
sources/format.h | file | annotate | diff | comparison | revisions | |
sources/interface.cpp | file | annotate | diff | comparison | revisions | |
sources/interface.h | file | annotate | diff | comparison | revisions | |
sources/mystring.cpp | file | annotate | diff | comparison | revisions | |
sources/mystring.h | file | annotate | diff | comparison | revisions | |
sources/network/rconsession.cpp | file | annotate | diff | comparison | revisions |
--- a/sources/coloredline.cpp Tue May 26 18:46:24 2015 +0300 +++ b/sources/coloredline.cpp Wed May 27 21:15:52 2015 +0300 @@ -125,6 +125,14 @@ // ------------------------------------------------------------------------------------------------- // +void ColoredLine::add_string (const String& text) +{ + for (char a : text) + add_char (a); +} + +// ------------------------------------------------------------------------------------------------- +// void ColoredLine::set_color (Color a, bool on) { switch (a)
--- a/sources/coloredline.h Tue May 26 18:46:24 2015 +0300 +++ b/sources/coloredline.h Wed May 27 21:15:52 2015 +0300 @@ -65,6 +65,7 @@ const Vector<int>& data() const { return m_data; } int length() const { return m_length; } void add_char (char ch); + void add_string (const String& msg); void finalize(); int rows (int cols) const;
--- a/sources/interface.h Tue May 26 18:46:24 2015 +0300 +++ b/sources/interface.h Wed May 27 21:15:52 2015 +0300 @@ -56,6 +56,7 @@ void need_refresh(); void tab_complete (const String& part, String complete); RCONSession* get_session() { return &Session; } + void disconnected(); void vprint (const char* fmtstr, va_list args); void __cdecl print (const char* fmtstr, ...); @@ -80,7 +81,7 @@ Function<void (void)> DisconnectConfirmFunction = nullptr; IPAddress CurrentAddress; String StatusBarText; - StringList PlayerNames; + List<ColoredLine> PlayerNames; String PasteBuffer; RCONSession Session; @@ -104,4 +105,4 @@ void yank (int a, int b); int find_previous_word(); int find_next_word(); -}; +}; \ No newline at end of file
--- a/sources/mystring.cpp Tue May 26 18:46:24 2015 +0300 +++ b/sources/mystring.cpp Wed May 27 21:15:52 2015 +0300 @@ -302,7 +302,7 @@ // ------------------------------------------------------------------------------------------------- // -bool String::starts_with (const String& other) +bool String::starts_with (const String& other) const { if (length() < other.length()) return false;
--- a/sources/mystring.h Tue May 26 18:46:24 2015 +0300 +++ b/sources/mystring.h Wed May 27 21:15:52 2015 +0300 @@ -104,8 +104,9 @@ void replace (int pos, int n, const String &a) { m_string.replace (pos, n, a.chars()); } void shrink_to_fit() { m_string.shrink_to_fit(); } void __cdecl sprintf (const char* fmtstr, ...); + void sprintf (const char* fmtstr, ...); void vsprintf (const char* fmtstr, va_list args); - bool starts_with (const String &other); + bool starts_with (const String &other) const; String strip (char unwanted) { return strip ({unwanted}); } String strip (const List<char> &unwanted); void trim (int n);
--- a/sources/network/rconsession.h Tue May 26 18:46:24 2015 +0300 +++ b/sources/network/rconsession.h Wed May 27 21:15:52 2015 +0300 @@ -37,7 +37,7 @@ // enum { - RCON_PROTOCOL_VERSION = 4 + RCON_PROTOCOL_VERSION = 5 }; // ------------------------------------------------------------------------------------------------- @@ -53,6 +53,11 @@ SVRC_UPDATE, SVRC_TABCOMPLETE, SVRC_TOOMANYTABCOMPLETES, + SVRC_WATCHINGCVAR, + SVRC_ALREADYWATCHINGCVAR, + SVRC_WATCHCVARNOTFOUND, + SVRC_CVARCHANGED, + SVRC_YOUREDISCONNECTED, }; // ------------------------------------------------------------------------------------------------- @@ -65,6 +70,7 @@ CLRC_PONG, CLRC_DISCONNECT, CLRC_TABCOMPLETE, + CLRC_WATCHCVAR, }; // -------------------------------------------------------------------------------------------------