summaryrefslogtreecommitdiffstats
path: root/Renderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Renderer.cpp')
-rw-r--r--Renderer.cpp31
1 files changed, 2 insertions, 29 deletions
diff --git a/Renderer.cpp b/Renderer.cpp
index 1c3255b..be00732 100644
--- a/Renderer.cpp
+++ b/Renderer.cpp
@@ -126,7 +126,7 @@ void Renderer::renderRoom(const Room &room, bool selected, bool hovered, float s
glColor4f(1.0f, 1.0f, 1.0f, 0.9f);
glLineWidth(2.0f);
}
- else if(hovered && editManager->getMode() == EditManager::VIEW) {
+ else if(hovered) {
glColor4f(0.0f, 0.7f, 1.0f, 0.7f);
glLineWidth(2.0f);
}
@@ -143,7 +143,7 @@ void Renderer::renderPlayerStart(const PlayerStart &start, bool selected, bool h
glColor4f(1.0f, 1.0f, 1.0f, 0.9f);
glLineWidth(2.0f);
}
- else if(hovered && editManager->getMode() == EditManager::VIEW) {
+ else if(hovered) {
glColor4f(0.0f, 0.7f, 0.7f, 0.7f);
glLineWidth(2.0f);
}
@@ -170,31 +170,4 @@ void Renderer::render(const Level &level, const Rectangle &rect, float scale) {
renderObject(**object, (&**object == editManager->getSelectedObject()),
(&**object == editManager->getHoveredObject()), scale);
}
-
- if(editManager->getMode() == EditManager::ADD) {
- Room *activeRoom = (Room*)editManager->getSelectedObject();
-
- if(editManager->polygonOk(*activeRoom))
- glColor4f(0.0f, 0.7f, 1.0f, 0.2f);
- else
- glColor4f(1.0f, 0.3f, 0.3f, 0.2f);
-
- fillPolygon(*activeRoom);
-
- glLineWidth(2.0f);
- glColor4f(0.0f, 0.7f, 1.0f, 0.7f);
- drawPolygon(*activeRoom, false);
-
- if(!activeRoom->empty() && editManager->getHoveredVertex()) {
- if(!editManager->vertexOk(*editManager->getHoveredVertex()))
- glColor4f(1.0f, 0.3f, 0.3f, 0.7f);
-
- glBegin(GL_LINES);
-
- glVertex2f(activeRoom->back().getX(), activeRoom->back().getY());
- glVertex2f(editManager->getHoveredVertex()->getX(), editManager->getHoveredVertex()->getY());
-
- glEnd();
- }
- }
}