summaryrefslogtreecommitdiff
path: root/tool.h
blob: 13a833a6b922c3febe6f8129149ef904e3a4f2ef (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
#ifndef TOOL_H
#define TOOL_H

#include "quadtree.h"
#include "vector.h"
#include "gui.h"

#include <SDL.h>

class Tool {
	protected:
		Quadtree *tree;
		GUI *gui;

	public:
		Tool(Quadtree *tree);
		virtual ~Tool() {};

		virtual bool handle_event(SDL_Event& event, Vector3& selected) = 0;
		virtual void render_gui();
		virtual const char* get_name() = 0;
};

class RaiseTool : public Tool {
	protected:
		static std::string name;

	public:
		RaiseTool(Quadtree *tree);
		virtual ~RaiseTool();

		virtual bool handle_event(SDL_Event& event, Vector3& selected);
		virtual const char* get_name();
};

#endif