about summary refs log tree commit diff
path: root/src/game/client/components/binds.hpp
blob: e9232484bd02cc0f9db685d91c5691540d85f827 (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
#include <game/client/component.hpp>

class BINDS : public COMPONENT
{
	char keybindings[KEY_LAST][128];
public:
	BINDS();
	
	class BINDS_SPECIAL : public COMPONENT
	{
	public:
		BINDS *binds;
		virtual bool on_input(INPUT_EVENT e);
	};
	
	BINDS_SPECIAL special_binds;
	
	void bind(int keyid, const char *str);
	void set_defaults();
	void unbindall();
	const char *get(int keyid);
	
	virtual void on_init();
	virtual bool on_input(INPUT_EVENT e);
};