aboutsummaryrefslogtreecommitdiff
path: root/src/editor.h
blob: 7c5a8480b591a94edbee2fc05989e38b828adb4b (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
34
35
36
37
#include <cObject.h>
#include <cObjectHandler.h>
#include <cRender.h>
#include <cInput.h>

#include <stdint.h>

class editor : public cObject
{
public:
	editor(sPos _size);
	~editor();

	void onChar(unsigned char _c);
	void onClick(sPos _pos, unsigned int _button);
	void moveCursor(sPos _relMovement);

	void setCursor(sPos _pos);
	void setColor(uint16_t _color);
	void setChar(unsigned char _c);

	void setMode(uint8_t _mode);

	void update();
private:
	sPos currentPosition;
	unsigned char currentChar;
	uint16_t currentColor;
	uint8_t currentMode;

	sPos size;
	unsigned char char_under_cursor;

	cObject *storage;

};