summaryrefslogtreecommitdiffstats
path: root/EditManager.h
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2008-01-16 17:11:00 +0100
committerneoraider <devnull@localhost>2008-01-16 17:11:00 +0100
commit8b4b9845d657970b920667f2c2ca64a4974463e9 (patch)
tree4c7d1d09cce705118c220967dc94873852d1669c /EditManager.h
parente9d27f488c8653967c9a5b86c94801367253444c (diff)
downloadzoomedit-8b4b9845d657970b920667f2c2ca64a4974463e9.tar
zoomedit-8b4b9845d657970b920667f2c2ca64a4974463e9.zip
zoomedit: Let tools decide wether to highlight hovered objects.
Diffstat (limited to 'EditManager.h')
-rw-r--r--EditManager.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/EditManager.h b/EditManager.h
index 44e1e11..bd33c9d 100644
--- a/EditManager.h
+++ b/EditManager.h
@@ -16,6 +16,7 @@ class EditManager {
Window *window;
LevelObject *hoveredObject;
+ LevelObject *highlightedObject;
LevelObject *selectedObject;
Vertex hoveredVertex;
@@ -32,6 +33,18 @@ class EditManager {
return hoveredObject;
}
+ void setHighlightedObject(LevelObject *object) {
+ highlightedObject = object;
+ }
+
+ LevelObject* getHighlightedObject() {
+ return highlightedObject;
+ }
+
+ void highlightHoveredObject() {
+ highlightedObject = hoveredObject;
+ }
+
void setSelectedObject(LevelObject *object) {
selectedObject = object;
}
@@ -42,8 +55,8 @@ class EditManager {
bool addRoom(const Room &room);
- Vertex* getHoveredVertex();
- void setHoveredVertex(Vertex *v);
+ const Vertex* getHoveredVertex() const;
+ void setHoveredVertex(const Vertex *v);
bool vertexOk(const Vertex &v, const Room *newRoom = NULL) const;
bool polygonOk(const Polygon &polygon) const;