#include <list>
#include "irrlichttypes.h"
-#include "util/coloredstring.h"
+#include "util/enriched_string.h"
// Chat console related classes
// age in seconds
f32 age;
// name of sending player, or empty if sent by server
- std::wstring name;
+ EnrichedString name;
// message text
- ColoredString text;
+ EnrichedString text;
- ChatLine(std::wstring a_name, std::wstring a_text):
+ ChatLine(const std::wstring &a_name, const std::wstring &a_text):
+ age(0.0),
+ name(a_name),
+ text(a_text)
+ {
+ }
+
+ ChatLine(const EnrichedString &a_name, const EnrichedString &a_text):
age(0.0),
name(a_name),
text(a_text)
struct ChatFormattedFragment
{
// text string
- std::wstring text;
+ EnrichedString text;
// starting column
u32 column;
// formatting
class ChatPrompt
{
public:
- ChatPrompt(std::wstring prompt, u32 history_limit);
+ ChatPrompt(const std::wstring &prompt, u32 history_limit);
~ChatPrompt();
// Input character or string
// Get the recent messages buffer
ChatBuffer& getRecentBuffer();
// Concatenate all recent messages
- std::wstring getRecentChat();
+ EnrichedString getRecentChat();
// Get the console prompt
ChatPrompt& getPrompt();