From 3b03f87070d91f63f0dc3c7152723727781dcccf Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 28 Apr 2018 11:52:04 +0200 Subject: Add commands, users side panel, improve image download start using odhtdb --- include/Chatbar.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/Chatbar.hpp') diff --git a/include/Chatbar.hpp b/include/Chatbar.hpp index c98db48..a9871f6 100644 --- a/include/Chatbar.hpp +++ b/include/Chatbar.hpp @@ -1,5 +1,6 @@ #pragma once +#include "StringView.hpp" #include #include #include @@ -16,6 +17,7 @@ namespace dchat Chatbar(); void addChar(sf::Uint32 codePoint); + void addString(const std::string &strToAdd); const sf::String& getString() const; void removePreviousChar(); void removeNextChar(); @@ -27,7 +29,9 @@ namespace dchat bool isFocused() const; void processEvent(const sf::Event &event, Channel *channel); - void draw(sf::RenderWindow &window, const sf::Vector2f &position); + void draw(sf::RenderWindow &window); + private: + void processChatCommand(const StringView &cmd); private: sf::Text text; sf::RectangleShape background; -- cgit v1.2.3