summaryrefslogtreecommitdiffstats
path: root/src/client/clui.hpp
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2020-12-06 19:47:25 +0000
committerJoursoir <chat@joursoir.net>2020-12-06 19:47:25 +0000
commite99a03a838ddcf9eecadc10a7f71837afac3b99c (patch)
tree092ac919a8a8090df9c01536f5169e27952f7776 /src/client/clui.hpp
parent91d777da4f5baeac47b3097913b2407b45bc031e (diff)
downloadwant-chat-e99a03a838ddcf9eecadc10a7f71837afac3b99c.tar.gz
want-chat-e99a03a838ddcf9eecadc10a7f71837afac3b99c.tar.bz2
want-chat-e99a03a838ddcf9eecadc10a7f71837afac3b99c.zip
some changes in reg/auth; client: remove name in arguments
Diffstat (limited to 'src/client/clui.hpp')
-rw-r--r--src/client/clui.hpp61
1 files changed, 0 insertions, 61 deletions
diff --git a/src/client/clui.hpp b/src/client/clui.hpp
deleted file mode 100644
index 0373f95..0000000
--- a/src/client/clui.hpp
+++ /dev/null
@@ -1,61 +0,0 @@
-// CLUI - Command Line User Interface
-
-#ifndef COMMANDLINEUI_H
-#define COMMANDLINEUI_H
-
-#include <ncurses.h>
-#include "../const_vars.hpp"
-
-class Interface_wc {
- WINDOW *w;
- int ny, nx;
- int beg_y, beg_x;
- int ch_line;
-public:
- Interface_wc(int num_y, int num_x, int by, int bx, char ch);
-
- WINDOW *GetWindow() { return w; }
- void SetCursor(int y, int x) { wmove(w, y, x); }
- void Clear(bool full);
- void Update() { wrefresh(w); }
- void Delete() { delwin(w); }
-
- void Hide();
-};
-
-class ChatRoom {
- Interface_wc *chat;
- Interface_wc *players;
- Interface_wc *input;
- int i_nx, i_ny;
-
- struct message {
- char msg[max_msg_len];
- int num_lines; // number of lines
- int type;
- message *prev;
- };
- message *first;
-public:
- ChatRoom();
- ~ChatRoom();
-
- // for chat:
- 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);
-private:
- // for chat:
- void ChatRedraw();
- void PrintMessage(int line, message *m);
-};
-
-#endif \ No newline at end of file