aboutsummaryrefslogtreecommitdiff
path: root/include/MessagePart.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/MessagePart.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/MessagePart.hpp')
-rw-r--r--include/MessagePart.hpp55
1 files changed, 0 insertions, 55 deletions
diff --git a/include/MessagePart.hpp b/include/MessagePart.hpp
deleted file mode 100644
index 00544fb..0000000
--- a/include/MessagePart.hpp
+++ /dev/null
@@ -1,55 +0,0 @@
-#pragma once
-
-#include <SFML/Graphics/Text.hpp>
-#include <SFML/Graphics/Sprite.hpp>
-#include <SFML/System/Vector2.hpp>
-#include <string>
-
-namespace dchat
-{
- class MessagePart
- {
- public:
- enum class Type
- {
- TEXT,
- EMOJI
- };
-
- MessagePart(Type _type, bool _newLine) : type(_type), newLine(_newLine) {}
- virtual ~MessagePart(){}
-
- static float getSizeScaled();
- virtual sf::Vector2f getPosition() const = 0;
- virtual sf::Vector2f getSize() const = 0;
-
- const Type type;
- bool newLine;
- };
-
- class MessagePartText : public MessagePart
- {
- public:
- MessagePartText(const std::string &text, bool newLine);
-
- static float getFontSizeScaled();
- virtual sf::Vector2f getPosition() const override;
- virtual sf::Vector2f getSize() const override;
-
- sf::Text text;
- };
-
- class MessagePartEmoji : public MessagePart
- {
- public:
- MessagePartEmoji(const std::string &url, bool newLine);
-
- static float getHeightScaled();
- virtual sf::Vector2f getPosition() const override;
- virtual sf::Vector2f getSize() const override;
-
- sf::Sprite sprite;
- std::string url;
- bool dirty;
- };
-}