From ddff0f1b7ea84f6a1321b8eb8a4d47317873d955 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 23 Apr 2018 09:53:31 +0200 Subject: 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 --- include/Message.hpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'include/Message.hpp') 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 #include @@ -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& getParts(); - - static Message* buildFromString(User *user, const std::string &str); + Message(User *user, const std::string &text); const User *user; - private: - std::vector messageParts; + Text text; }; } -- cgit v1.2.3