From 1e0e68f9cda51c881b32a54d9eece71c1428f7ac Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 22 Apr 2018 05:58:44 +0200 Subject: Add video and gif support Gif streams from url. Todo: Add play controls to video --- include/Chatbar.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/Chatbar.hpp') 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 #include #include +#include +#include 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; }; } -- cgit v1.2.3