aboutsummaryrefslogtreecommitdiff
path: root/include/Chatbar.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/Chatbar.hpp')
-rw-r--r--include/Chatbar.hpp9
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;
};
}