summaryrefslogtreecommitdiffstats
path: root/Project/Element.cpp
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2016-08-03 17:43:25 -0300
committerThales1330 <thaleslima.ufu@gmail.com>2016-08-03 17:43:25 -0300
commit46c9d3fe586fb5c8ac75384b62a79971f96a5b88 (patch)
tree686264564945c68f788887a2745f08f8bb3f0926 /Project/Element.cpp
parent0b720e578e0e91262e04651ce81cd2e7f6828967 (diff)
downloadPSP.git-46c9d3fe586fb5c8ac75384b62a79971f96a5b88.tar.gz
PSP.git-46c9d3fe586fb5c8ac75384b62a79971f96a5b88.tar.xz
PSP.git-46c9d3fe586fb5c8ac75384b62a79971f96a5b88.zip
Bus implemented, selection not working
Selection to move fail
Diffstat (limited to 'Project/Element.cpp')
-rw-r--r--Project/Element.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Project/Element.cpp b/Project/Element.cpp
index 984eb65..a485c82 100644
--- a/Project/Element.cpp
+++ b/Project/Element.cpp
@@ -63,3 +63,14 @@ wxPoint2DDouble Element::RotateAtPosition(wxPoint2DDouble pointToRotate, double
std::sin(radAngle) * (pointToRotate.m_x - m_position.m_x) +
std::cos(radAngle) * (pointToRotate.m_y - m_position.m_y) + m_position.m_y);
}
+
+void Element::StartMove(wxPoint2DDouble position)
+{
+ this->m_moveStartPt = position;
+ this->m_movePos = m_position;
+}
+
+void Element::Move(wxPoint2DDouble position)
+{
+ SetPosition(m_movePos + position - m_moveStartPt);
+} \ No newline at end of file