diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-04-22 05:58:44 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2018-04-22 05:59:18 +0200 |
commit | 1e0e68f9cda51c881b32a54d9eece71c1428f7ac (patch) | |
tree | b8faa1d971c245e3fcf046aa1d2daa1fa601e0f9 /include/MessagePart.hpp | |
parent | 424b02609fa34175a4e2aadb95e68b3c9c8dc93c (diff) |
Add video and gif support
Gif streams from url.
Todo: Add play controls to video
Diffstat (limited to 'include/MessagePart.hpp')
-rw-r--r-- | include/MessagePart.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/MessagePart.hpp b/include/MessagePart.hpp index d0a0a03..00544fb 100644 --- a/include/MessagePart.hpp +++ b/include/MessagePart.hpp @@ -16,7 +16,7 @@ namespace dchat EMOJI }; - MessagePart(Type _type) : type(_type) {} + MessagePart(Type _type, bool _newLine) : type(_type), newLine(_newLine) {} virtual ~MessagePart(){} static float getSizeScaled(); @@ -24,12 +24,13 @@ namespace dchat virtual sf::Vector2f getSize() const = 0; const Type type; + bool newLine; }; class MessagePartText : public MessagePart { public: - MessagePartText(const std::string &text); + MessagePartText(const std::string &text, bool newLine); static float getFontSizeScaled(); virtual sf::Vector2f getPosition() const override; @@ -41,7 +42,7 @@ namespace dchat class MessagePartEmoji : public MessagePart { public: - MessagePartEmoji(const std::string &url); + MessagePartEmoji(const std::string &url, bool newLine); static float getHeightScaled(); virtual sf::Vector2f getPosition() const override; |