summaryrefslogtreecommitdiffstats
path: root/Project/Element.h
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.h
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.h')
-rw-r--r--Project/Element.h32
1 files changed, 19 insertions, 13 deletions
diff --git a/Project/Element.h b/Project/Element.h
index bb74910..1196f64 100644
--- a/Project/Element.h
+++ b/Project/Element.h
@@ -7,13 +7,13 @@
enum PickboxID
{
- ID_PB_NONE = 0,
- ID_PB_RIGHT,
- ID_PB_LEFT,
- ID_PB_RIGHT_BOTTOM,
- ID_PB_RIGHT_TOP,
- ID_PB_LEFT_BOTTOM,
- ID_PB_LEFT_TOP
+ ID_PB_NONE = 0,
+ ID_PB_RIGHT,
+ ID_PB_LEFT,
+ ID_PB_RIGHT_BOTTOM,
+ ID_PB_RIGHT_TOP,
+ ID_PB_LEFT_BOTTOM,
+ ID_PB_LEFT_TOP
};
class Element
@@ -49,17 +49,20 @@ class Element
virtual wxCursor GetBestPickboxCursor() const = 0;
// General methods
+ virtual void StartMove(wxPoint2DDouble position);
+ virtual void Move(wxPoint2DDouble position);
+ void ResetPickboxes() { m_activePickboxID = ID_PB_NONE; }
wxPoint2DDouble WorldToScreen(wxPoint2DDouble translation,
double scale,
double offsetX = 0.0,
double offsetY = 0.0) const;
void DrawCircle(wxPoint2DDouble position, double radius, int numSegments, GLenum mode = GL_LINE_LOOP) const;
void DrawRectangle(wxPoint2DDouble position, double width, double height, GLenum mode = GL_QUADS) const;
- void DrawRectangle(wxPoint2DDouble* points, GLenum mode = GL_QUADS) const;
- void DrawPickbox(wxPoint2DDouble position) const;
+ void DrawRectangle(wxPoint2DDouble* points, GLenum mode = GL_QUADS) const;
+ void DrawPickbox(wxPoint2DDouble position) const;
wxPoint2DDouble RotateAtPosition(wxPoint2DDouble pointToRotate, double angle, bool degrees = true) const;
-
- protected:
+
+ protected:
wxRect2DDouble m_rect;
wxPoint2DDouble m_position;
double m_width = 0.0;
@@ -70,8 +73,11 @@ class Element
bool m_selected = false;
bool m_dragging = false;
bool m_showPickbox = false;
-
- PickboxID m_activePickboxID = ID_PB_NONE;
+
+ int m_activePickboxID = ID_PB_NONE;
+
+ wxPoint2DDouble m_moveStartPt;
+ wxPoint2DDouble m_movePos;
};
#endif // ELEMENT_H