diff options
Diffstat (limited to 'include/Chatbar.hpp')
-rw-r--r-- | include/Chatbar.hpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/Chatbar.hpp b/include/Chatbar.hpp index 10bbebd..701220a 100644 --- a/include/Chatbar.hpp +++ b/include/Chatbar.hpp @@ -1,18 +1,20 @@ #pragma once -#include "StringView.hpp" #include "Text.hpp" -#include "Cache.hpp" #include <SFML/Graphics/RenderWindow.hpp> #include <SFML/Graphics/RectangleShape.hpp> #include <SFML/Window/Event.hpp> #include <SFML/System/Clock.hpp> +#include <dchat/StringView.hpp> #include <string> #include <unordered_map> +#include <memory> namespace dchat { - class Channel; + class Cache; + class Room; + class MessageBoard; class Chatbar { @@ -21,8 +23,8 @@ namespace dchat bool isFocused() const; - void processEvent(const sf::Event &event, Cache &cache, Channel *channel); - void draw(sf::RenderWindow &window, Cache &cache); + void processEvent(const sf::Event &event, Cache *cache, std::shared_ptr<Room> room, MessageBoard *messageBoard); + void draw(sf::RenderWindow &window, Cache *cache); static sf::Vector2f getInputPosition(sf::RenderWindow &window); static sf::Vector2f getInputSize(sf::RenderWindow &window); @@ -30,6 +32,7 @@ namespace dchat static bool addBind(const std::string &key, const std::string &value, bool updateFile = true); static bool removeBind(const std::string &key, bool updateFile = true); + static void loadBindsFromFile(); static const std::unordered_map<std::string, std::string>& getBinds(); private: void processChatCommand(const StringView &cmd); |