From 67cdd15d97b14dd92de28fdbdb2770187c94e338 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Fri, 27 Nov 2020 01:21:10 +0300 Subject: one more fix chat, support spec-messages, add exit from program :) --- src/client/clui.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/client/clui.hpp') diff --git a/src/client/clui.hpp b/src/client/clui.hpp index de47177..0373f95 100644 --- a/src/client/clui.hpp +++ b/src/client/clui.hpp @@ -4,6 +4,7 @@ #define COMMANDLINEUI_H #include +#include "../const_vars.hpp" class Interface_wc { WINDOW *w; @@ -29,8 +30,9 @@ class ChatRoom { int i_nx, i_ny; struct message { - char msg[300]; + char msg[max_msg_len]; int num_lines; // number of lines + int type; message *prev; }; message *first; @@ -39,19 +41,17 @@ public: ~ChatRoom(); // for chat: - void AddMessage(char *msg); + void AddMessage(char *msg, int type); // for players: //void AddPlayer() // for input: + int InputGetch() { return wgetch(input->GetWindow()); } bool AddCharToSendMsg(char ch); bool RemoveCharFromMsg(); void InputClear() { input->Clear(false); } void SetInputCursor(int y, int x); - - WINDOW *GetInputWin() { return input->GetWindow(); } - WINDOW *GetChatWin() { return chat->GetWindow(); } private: // for chat: void ChatRedraw(); -- cgit v1.2.3-18-g5258