From 55e76bdaafa1e2a94fbd717335c1c7bd8c8fc156 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Mon, 18 Apr 2011 19:35:48 +0200 Subject: Basic tool implementation. --- tool.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tool.h (limited to 'tool.h') diff --git a/tool.h b/tool.h new file mode 100644 index 0000000..13a833a --- /dev/null +++ b/tool.h @@ -0,0 +1,36 @@ +#ifndef TOOL_H +#define TOOL_H + +#include "quadtree.h" +#include "vector.h" +#include "gui.h" + +#include + +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 -- cgit v1.2.3