diff options
Diffstat (limited to 'EditManager.h')
-rw-r--r-- | EditManager.h | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/EditManager.h b/EditManager.h index 8c0d86b..4413aeb 100644 --- a/EditManager.h +++ b/EditManager.h @@ -10,57 +10,43 @@ class Window; class EditManager { - public: - enum Mode { - VIEW, ADD - }; - private: - Mode mode; - IdManager idManager; Window *window; - Room newRoom; - LevelObject *selectedObject; - LevelObject *hoveredObject; + LevelObject *selectedObject; Vertex hoveredVertex; bool hasHoveredVertex; - bool lineOk(const Line& l) const; + bool lineOk(const Room &newRoom, const Line &l) const; public: EditManager(Window *window); void redraw(); - void addRoom(); - void finishRoom(); - - void addVertex(const Vertex &v); + LevelObject* getHoveredObject() { + return hoveredObject; + } - Mode getMode() const { - return mode; + void setSelectedObject(LevelObject *object) { + selectedObject = object; } LevelObject* getSelectedObject() { return selectedObject; } - LevelObject* getHoveredObject() { - return hoveredObject; - } + bool addRoom(const Room &room); Vertex* getHoveredVertex(); void setHoveredVertex(Vertex *v); - void buttonPress(unsigned int button); - - bool vertexOk(const Vertex& v) const; - bool polygonOk(const Polygon& polygon) const; + bool vertexOk(const Room &newRoom, const Vertex &v) const; + bool polygonOk(const Polygon &polygon) const; }; #endif /*EDITMANAGER_H_*/ |