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/Chatbar.hpp | |
parent | 424b02609fa34175a4e2aadb95e68b3c9c8dc93c (diff) |
Add video and gif support
Gif streams from url.
Todo: Add play controls to video
Diffstat (limited to 'include/Chatbar.hpp')
-rw-r--r-- | include/Chatbar.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/Chatbar.hpp b/include/Chatbar.hpp index 143ebba..d24b2af 100644 --- a/include/Chatbar.hpp +++ b/include/Chatbar.hpp @@ -3,9 +3,13 @@ #include <SFML/Graphics/Text.hpp> #include <SFML/Graphics/RenderWindow.hpp> #include <SFML/Graphics/RectangleShape.hpp> +#include <SFML/Window/Event.hpp> +#include <SFML/System/Clock.hpp> namespace dchat { + class Channel; + class Chatbar { public: @@ -20,11 +24,16 @@ namespace dchat void moveCaretLeft(); void moveCaretRight(); + bool isFocused() const; + + void processEvent(const sf::Event &event, Channel *channel); void draw(sf::RenderWindow &window); private: sf::Text text; sf::RectangleShape background; int caretIndex; sf::Vector2f caretOffset; + sf::Clock blinkTimer; + bool focused; }; } |