From 8b4b9845d657970b920667f2c2ca64a4974463e9 Mon Sep 17 00:00:00 2001 From: neoraider Date: Wed, 16 Jan 2008 16:11:00 +0000 Subject: zoomedit: Let tools decide wether to highlight hovered objects. --- EditManager.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'EditManager.h') 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; -- cgit v1.2.3