aboutsummaryrefslogtreecommitdiff
path: root/include/Chatbar.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-04-28 11:52:04 +0200
committerdec05eba <dec05eba@protonmail.com>2018-04-28 11:53:18 +0200
commit3b03f87070d91f63f0dc3c7152723727781dcccf (patch)
tree7b06163f34248d1e632c032cfaf306787675e585 /include/Chatbar.hpp
parentb0bfb8b8d1479502bd5adf17e6a1b94ec00c63ca (diff)
Add commands, users side panel, improve image download
start using odhtdb
Diffstat (limited to 'include/Chatbar.hpp')
-rw-r--r--include/Chatbar.hpp6
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;