aboutsummaryrefslogtreecommitdiff
path: root/include/Message.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-04-23 09:53:31 +0200
committerdec05eba <dec05eba@protonmail.com>2018-04-23 09:55:12 +0200
commitddff0f1b7ea84f6a1321b8eb8a4d47317873d955 (patch)
tree28565c3a3d336559fcf149e1552ae237cc3d855d /include/Message.hpp
parent1e0e68f9cda51c881b32a54d9eece71c1428f7ac (diff)
Add word wrap for message board & TODO
TODO: Message board is now redrawn every frame. Text should be modified to render on static & dynamic texture -> text & static images on static texture, gif & video on dynamic texture
Diffstat (limited to 'include/Message.hpp')
-rw-r--r--include/Message.hpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/include/Message.hpp b/include/Message.hpp
index 7cd7fdf..a6edddf 100644
--- a/include/Message.hpp
+++ b/include/Message.hpp
@@ -1,7 +1,7 @@
#pragma once
-#include "MessagePart.hpp"
#include "User.hpp"
+#include "Text.hpp"
#include <string>
#include <vector>
@@ -10,17 +10,9 @@ namespace dchat
class Message
{
public:
- Message(User *user);
- virtual ~Message();
-
- void addText(const std::string &text, bool newLine = true);
- void addEmoji(const std::string &url, bool newLine = true);
- std::vector<MessagePart*>& getParts();
-
- static Message* buildFromString(User *user, const std::string &str);
+ Message(User *user, const std::string &text);
const User *user;
- private:
- std::vector<MessagePart*> messageParts;
+ Text text;
};
}