aboutsummaryrefslogtreecommitdiff
path: root/include/MessagePart.hpp
diff options
context:
space:
mode:
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;
- };
-}