summaryrefslogtreecommitdiffstats
path: root/Project/Load.cpp
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2016-09-05 18:43:50 -0300
committerThales1330 <thaleslima.ufu@gmail.com>2016-09-05 18:43:50 -0300
commitd93ef357da510f2515556ff2cb51688a4e068805 (patch)
treeda24ff514d5d507252681365d7cda6b08576af23 /Project/Load.cpp
parent47cebfc84d4ae315f4bf8ffb3d074b2b75781a1b (diff)
downloadPSP.git-d93ef357da510f2515556ff2cb51688a4e068805.tar.gz
PSP.git-d93ef357da510f2515556ff2cb51688a4e068805.tar.xz
PSP.git-d93ef357da510f2515556ff2cb51688a4e068805.zip
All elements implemented, switches implemented
Diffstat (limited to 'Project/Load.cpp')
-rw-r--r--Project/Load.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/Project/Load.cpp b/Project/Load.cpp
index a932c64..b5c5948 100644
--- a/Project/Load.cpp
+++ b/Project/Load.cpp
@@ -25,6 +25,11 @@ bool Load::AddParent(Element* parent, wxPoint2DDouble position)
m_triangPts.push_back(wxPoint2DDouble(0.0, m_height / 2.0));
m_inserted = true;
+
+ wxRect2DDouble genRect(0,0,0,0);
+ m_switchRect.push_back(genRect); // Push a general rectangle.
+ UpdateSwitches();
+
return true;
}
return false;
@@ -65,7 +70,9 @@ void Load::Draw(wxPoint2DDouble translation, double scale) const
DrawCircle(m_pointList[0], 5.0, 10, GL_POLYGON);
DrawLine(m_pointList);
-
+
+ DrawSwitches();
+
std::vector<wxPoint2DDouble> triangPts;
for(int i = 0; i < 3; i++) {
triangPts.push_back(m_triangPts[i] + m_position);
@@ -74,6 +81,7 @@ void Load::Draw(wxPoint2DDouble translation, double scale) const
glTranslated(m_position.m_x, m_position.m_y, 0.0);
glRotated(m_angle, 0.0, 0.0, 1.0);
glTranslated(-m_position.m_x, -m_position.m_y, 0.0);
+ glColor4d(0.2, 0.2, 0.2, 1.0);
DrawTriangle(triangPts);
glPopMatrix();
}