aboutsummaryrefslogtreecommitdiff
path: root/src/RoomContainer.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-04-08 21:04:12 +0200
committerdec05eba <dec05eba@protonmail.com>2019-04-08 21:04:17 +0200
commit725ea566a2b6a12e0a02e4f570b6e99102e2d21b (patch)
treed35a338392e15f50402c2055d520e7b1c3ea36a2 /src/RoomContainer.cpp
parent4aac8df198e3a5bd9c6efc95cdf4c520c2e05401 (diff)
Refactor, remove a lot of code and use dchat core instead
Diffstat (limited to 'src/RoomContainer.cpp')
-rw-r--r--src/RoomContainer.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/RoomContainer.cpp b/src/RoomContainer.cpp
new file mode 100644
index 0000000..c560688
--- /dev/null
+++ b/src/RoomContainer.cpp
@@ -0,0 +1,24 @@
+#include "../include/RoomContainer.hpp"
+
+namespace dchat
+{
+ RoomContainer::RoomContainer(std::shared_ptr<Room> _room) :
+ room(_room),
+ messageBoard(_room),
+ offlineRoom(false)
+ {
+
+ }
+
+ void RoomContainer::processEvent(const sf::Event &event, Cache *cache)
+ {
+ chatbar.processEvent(event, cache, room, &messageBoard);
+ messageBoard.processEvent(event, cache);
+ }
+
+ void RoomContainer::draw(sf::RenderWindow &window, Cache *cache)
+ {
+ messageBoard.draw(window, cache);
+ chatbar.draw(window, cache);
+ }
+} \ No newline at end of file