#ifndef CHAT_HEADER
#define CHAT_HEADER
-#include "irrlichttypes_bloated.h"
+#include "irrlichttypes.h"
#include <string>
#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();
void historyNext();
// Nick completion
- void nickCompletion(const std::list<std::wstring>& names, bool backwards);
+ void nickCompletion(const std::list<std::string>& names, bool backwards);
// Update console size and reformat the visible portion of the prompt
void reformat(u32 cols);
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;