diff options
Diffstat (limited to 'include/Chatbar.hpp')
-rw-r--r-- | include/Chatbar.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
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 <SFML/Graphics/Text.hpp> #include <SFML/Graphics/RenderWindow.hpp> #include <SFML/Graphics/RectangleShape.hpp> @@ -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; |