summaryrefslogtreecommitdiffstats
path: root/src/client/clui/Client.hpp
blob: 20599f4c638270f0174eaa1b96046ac9ab5cb11b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef WC_CLUI_CLIENT_H
#define WC_CLUI_CLIENT_H

#include "../../const_vars.hpp"
#include "../ClientBase.hpp"

class WindowChat;
class WindowPlayers;
class WindowTips;
class WindowInput;

class Client : public ClientBase {
	char in_buffer[max_usermsg_len]; // for input
	int in_buf_used;

	bool exit_flag;

	WindowChat *chat;
	WindowPlayers *players;
	WindowTips *tips;
	WindowInput *input;
public:
	Client(const char* ip, int port);
	~Client();

	virtual void HandleActions();
	virtual void AddMessage(const char *msg, const char spec_char);
private:
	void AddCharToBuffer(char ch);
	void RemoveCharFromBuffer();
};

#endif