summaryrefslogtreecommitdiffstats
path: root/Project/Bus.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2016-12-29 02:32:50 -0200
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2016-12-29 02:32:50 -0200
commitd792fcf7b2a5862ac86ee69aa86021b5637ca8ee (patch)
treec00bb1d27666ee7d42839efbd420369b2a0d24e3 /Project/Bus.cpp
parentfb9de1b7935376897f1c93676ab1faeb1ea25f25 (diff)
downloadPSP.git-d792fcf7b2a5862ac86ee69aa86021b5637ca8ee.tar.gz
PSP.git-d792fcf7b2a5862ac86ee69aa86021b5637ca8ee.tar.xz
PSP.git-d792fcf7b2a5862ac86ee69aa86021b5637ca8ee.zip
Copy paste implemented
Some bugs on the text
Diffstat (limited to 'Project/Bus.cpp')
-rw-r--r--Project/Bus.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Project/Bus.cpp b/Project/Bus.cpp
index 72d6412..dffe8fc 100644
--- a/Project/Bus.cpp
+++ b/Project/Bus.cpp
@@ -53,7 +53,7 @@ void Bus::Draw(wxPoint2DDouble translation, double scale) const
glRotated(m_angle, 0.0, 0.0, 1.0);
glTranslated(-m_position.m_x, -m_position.m_y, 0.0);
- glColor4dv(m_busColour->GetRGBA());
+ glColor4dv(m_busColour.GetRGBA());
DrawRectangle(m_position, m_width, m_height);
// Pop the old matrix back.
glPopMatrix();
@@ -186,3 +186,10 @@ bool Bus::ShowForm(wxWindow* parent, Element* element)
busForm->Destroy();
return false;
}
+
+Element* Bus::GetCopy()
+{
+ Bus* copy = new Bus();
+ *copy = *this;
+ return copy;
+}