Permalink
Browse files

Fixed cursor box draw

  • Loading branch information...
1 parent ca1c55b commit 5e940f17c62aca66cce02fd186b9d22b0223af14 @RachelJMorris committed Mar 20, 2013
Showing with 23 additions and 2 deletions.
  1. +23 −2 Input.cpp
View
@@ -238,7 +238,7 @@ void Input::DrawCursor()
lstPoints[7].y = m_cursorPosition.y + tileWidth;
lstPoints[7].z = m_cursorPosition.z + tileWidth;
- // XZ bottom
+ // XY bottom
glBegin( GL_LINES );
glVertex3f( lstPoints[0].x, lstPoints[0].y, lstPoints[0].z );
glVertex3f( lstPoints[1].x, lstPoints[1].y, lstPoints[1].z );
@@ -247,7 +247,7 @@ void Input::DrawCursor()
glVertex3f( lstPoints[0].x, lstPoints[0].y, lstPoints[0].z );
glEnd();
- // XZ top
+ // XY top
glBegin( GL_LINES );
glVertex3f( lstPoints[3].x, lstPoints[3].y + 0.1, lstPoints[3].z );
glVertex3f( lstPoints[2].x, lstPoints[2].y + 0.1, lstPoints[2].z );
@@ -276,6 +276,27 @@ void Input::DrawCursor()
glVertex3f( lstPoints[4].x, lstPoints[4].y, lstPoints[4].z );
glVertex3f( lstPoints[7].x, lstPoints[7].y, lstPoints[7].z );
glEnd();
+
+ // XZ Lines
+ glBegin( GL_LINES );
+ glVertex3f( lstPoints[0].x, lstPoints[0].y, lstPoints[0].z );
+ glVertex3f( lstPoints[4].x, lstPoints[4].y, lstPoints[4].z );
+ glEnd();
+
+ glBegin( GL_LINES );
+ glVertex3f( lstPoints[1].x, lstPoints[1].y, lstPoints[1].z );
+ glVertex3f( lstPoints[5].x, lstPoints[5].y, lstPoints[5].z );
+ glEnd();
+
+ glBegin( GL_LINES );
+ glVertex3f( lstPoints[2].x, lstPoints[2].y, lstPoints[2].z );
+ glVertex3f( lstPoints[6].x, lstPoints[6].y, lstPoints[6].z );
+ glEnd();
+
+ glBegin( GL_LINES );
+ glVertex3f( lstPoints[3].x, lstPoints[3].y, lstPoints[3].z );
+ glVertex3f( lstPoints[7].x, lstPoints[7].y, lstPoints[7].z );
+ glEnd();
}

0 comments on commit 5e940f1

Please sign in to comment.