aboutsummaryrefslogtreecommitdiff
path: root/src/chat.h
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2016-12-22 23:16:00 +0100
committerest31 <MTest31@outlook.com>2016-12-22 23:16:00 +0100
commit81d56b94919dceb7b2e51d70b21a7ca22f852bd5 (patch)
tree1e9ef1be1b3295a8673d6e4f0bdeb4c2d3a6015f /src/chat.h
parent8077612dcb48221281e726a60eb97bf73fde462b (diff)
parent231ac33d34dfaaddf292c5f31b1eae43eeefba2d (diff)
downloadminetest-81d56b94919dceb7b2e51d70b21a7ca22f852bd5.tar.gz
minetest-81d56b94919dceb7b2e51d70b21a7ca22f852bd5.tar.bz2
minetest-81d56b94919dceb7b2e51d70b21a7ca22f852bd5.zip
Merge 0.4.15 changes into stable-0.4
0.4.15 release!
Diffstat (limited to 'src/chat.h')
-rw-r--r--src/chat.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/chat.h b/src/chat.h
index db4146d35..11061fd39 100644
--- a/src/chat.h
+++ b/src/chat.h
@@ -20,11 +20,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef CHAT_HEADER
#define CHAT_HEADER
-#include "irrlichttypes.h"
#include <string>
#include <vector>
#include <list>
+#include "irrlichttypes.h"
+#include "util/enriched_string.h"
+
// Chat console related classes
struct ChatLine
@@ -32,9 +34,9 @@ struct ChatLine
// age in seconds
f32 age;
// name of sending player, or empty if sent by server
- std::wstring name;
+ EnrichedString name;
// message text
- std::wstring text;
+ EnrichedString text;
ChatLine(std::wstring a_name, std::wstring a_text):
age(0.0),
@@ -42,12 +44,19 @@ struct ChatLine
text(a_text)
{
}
+
+ ChatLine(EnrichedString a_name, 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
@@ -260,7 +269,7 @@ public:
// Get the recent messages buffer
ChatBuffer& getRecentBuffer();
// Concatenate all recent messages
- std::wstring getRecentChat();
+ EnrichedString getRecentChat();
// Get the console prompt
ChatPrompt& getPrompt();