#include <vector>
#include <list>
-// Chat console related classes, only used by the client
+// Chat console related classes
struct ChatLine
{
u32 m_scrollback;
// Array of unformatted chat lines
std::vector<ChatLine> m_unformatted;
-
+
// Number of character columns in console
u32 m_cols;
// Number of character rows in console
ChatPrompt(std::wstring prompt, u32 history_limit);
~ChatPrompt();
- // Input character
+ // Input character or string
void input(wchar_t ch);
+ void input(const std::wstring &str);
// Submit, clear and return current line
std::wstring submit();
std::wstring m_line;
// History buffer
std::vector<std::wstring> m_history;
- // History index (0 <= m_history_index <= m_history.size())
+ // History index (0 <= m_history_index <= m_history.size())
u32 m_history_index;
// Maximum number of history entries
u32 m_history_limit;