From 845c0262f4ab243748b085c2608c0e3e28799a0a Mon Sep 17 00:00:00 2001 From: Joursoir Date: Fri, 11 Dec 2020 18:57:13 +0000 Subject: clui feature: handle players and online info from server, show it --- src/client/clui/clui.hpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/client/clui/clui.hpp') diff --git a/src/client/clui/clui.hpp b/src/client/clui/clui.hpp index 87445db..23f6c70 100644 --- a/src/client/clui/clui.hpp +++ b/src/client/clui/clui.hpp @@ -10,7 +10,7 @@ class WindowChat : public WindowInterface { struct message { char text[max_msg_len]; int num_lines; // number of lines - int type; + char spec_char; message *prev; }; message *first; @@ -19,7 +19,7 @@ public: : WindowInterface(num_y, num_x, by, bx, ch), first(0) {} ~WindowChat(); - void AddMessage(const char *msg, int type); + void AddMessage(const char *msg, const char spec_ch); private: void ChatRedraw(); void PrintMessage(int line, message *m); @@ -27,16 +27,19 @@ private: class WindowPlayers : public WindowInterface { public: - WindowPlayers(int num_y, int num_x, int by, int bx, char ch) - : WindowInterface(num_y, num_x, by, bx, ch) {} + WindowPlayers(int num_y, int num_x, int by, int bx, char ch); ~WindowPlayers() {} + + void SetPlayersList(const char *list); }; class WindowTips : public WindowInterface { public: - WindowTips(int num_y, int num_x, int by, int bx, char ch) - : WindowInterface(num_y, num_x, by, bx, ch) {} + WindowTips(int num_y, int num_x, int by, int bx, char ch); ~WindowTips() {} + + void SetGeneralOnline(const char *online); + void SetRoomOnline(const char *online); }; class WindowInput : public WindowInterface { -- cgit v1.2.3-18-g5258