#ifndef EDITMANAGER_H_ #define EDITMANAGER_H_ #include "SharedPtr.h" #include "Room.h" #include "IdManager.h" class Window; class EditManager { public: enum Mode { VIEW, ADD }; private: Mode mode; IdManager idManager; Window *window; Room newRoom; LevelObject *selectedObject; LevelObject *hoveredObject; Vertex hoveredVertex; bool hasHoveredVertex; bool lineOk(const Line& l) const; public: EditManager(Window *window); void update(); void addRoom(); void finishRoom(); void addVertex(const Vertex &v); Mode getMode() const { return mode; } LevelObject* getSelectedObject() { return selectedObject; } LevelObject* getHoveredObject() { return hoveredObject; } Vertex* getHoveredVertex(); void setHoveredVertex(Vertex *v); void buttonPress(unsigned int button); bool vertexOk(const Vertex& v) const; bool polygonOk(const Polygon& polygon) const; }; #endif /*EDITMANAGER_H_*/