diff options
author | Thales1330 <thaleslima.ufu@gmail.com> | 2016-12-29 14:14:21 -0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-29 14:14:21 -0200 |
commit | c5343c718cf80620c2fc7452a4315f7ddb9e5826 (patch) | |
tree | 3d5dbd283f31004cc6ef826c2b75d5e5ed9d9f27 /Project/Bus.cpp | |
parent | 28e9cc4d9df63cb12c01d49017172c5f39ca9c22 (diff) | |
parent | 3750a0691f4975045647f3f70d8215fb1884e6fb (diff) | |
download | PSP.git-c5343c718cf80620c2fc7452a4315f7ddb9e5826.tar.gz PSP.git-c5343c718cf80620c2fc7452a4315f7ddb9e5826.tar.xz PSP.git-c5343c718cf80620c2fc7452a4315f7ddb9e5826.zip |
Merge pull request #4 from Thales1330/wip/copy-paste
Wip copy paste
Diffstat (limited to 'Project/Bus.cpp')
-rw-r--r-- | Project/Bus.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Project/Bus.cpp b/Project/Bus.cpp index f41b0d1..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); - glColor4d(0.0, 0.3, 1.0, 1.0); + 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; +} |