From 9f6cdb671ca3c045085bd8eed623e0a797894e1f Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sat, 12 Dec 2020 12:41:39 +0000 Subject: GUI feature: handle players and online info from server, show it; fix: close app; --- src/client/gui/Client.hpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/client/gui/Client.hpp') diff --git a/src/client/gui/Client.hpp b/src/client/gui/Client.hpp index a8d2376..75144b7 100644 --- a/src/client/gui/Client.hpp +++ b/src/client/gui/Client.hpp @@ -7,17 +7,23 @@ class Client : public ClientBase { ChatBaseOutput **chat; + ChatBaseOutput **players; + ChatBaseOutput **tips; public: - Client(const char* ip, int port, ChatBaseOutput **cb_out) - : ClientBase(ip, port), chat(cb_out) - { - for(int i = 0; i < lines_in_chat; i++) - cb_out[i]->value(""); - } + Client(const char* ip, int port, ChatBaseOutput **i_chat, + ChatBaseOutput **i_players, ChatBaseOutput **i_tips) + : ClientBase(ip, port), chat(i_chat), players(i_players), + tips(i_tips) { } ~Client() {} virtual void HandleActions() {} - virtual void AddMessage(const char *msg, int type); + virtual void AddMessage(const char *msg, const char spec_char); + +private: + void UpdatePlayerList(const char *list); + void SetGeneralOnline(const char *online); + void SetRoomOnline(const char *online); + void UpdateMessagesInChat(const char *msg, const char spec_char); }; #endif \ No newline at end of file -- cgit v1.2.3-18-g5258