Symbol editor now has constraints on selection, but part list allows selection inside groups.

Added logical 'xor' operator for scripting.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@534 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-07-09 20:43:16 +00:00
parent 31e60181ce
commit b409188013
19 changed files with 523 additions and 291 deletions
+11 -3
View File
@@ -74,6 +74,15 @@ class SymbolSelectEditor : public SymbolEditorBase {
Vector2D minV, maxV;
// Where is the rotation center?
Vector2D center;
// What kind of clicking/dragging are we doing
enum ClickMode {
CLICK_NONE,
CLICK_MOVE, // moving parts around
CLICK_HANDLE, // dragging a handle
CLICK_CENTER, // dragging the rotation center
CLICK_RECT, // selection rectangle
CLICK_TOGGLE, // same selection, not moved -> switch to rotate mode
} click_mode;
// At what angle is the handle we started draging for rotation
double startAngle;
// what side are we dragging/rotating on?
@@ -82,6 +91,8 @@ class SymbolSelectEditor : public SymbolEditorBase {
bool have_dragged;
// Do we want to rotate?
bool rotate;
// selection rectangle
Vector2D selection_rect_a, selection_rect_b;
// Graphics assets
wxCursor cursorRotate;
wxCursor cursorShearX;
@@ -104,9 +115,6 @@ class SymbolSelectEditor : public SymbolEditorBase {
/// Return the position of a handle, dx,dy in <-1, 0, 1>
Vector2D handlePos(int dx, int dy);
/// Find the first part at the given position
SymbolPartP findPart(const Vector2D& pos);
/// Update minV and maxV to be the bounding box of the selected_parts
/// Updates center to be the rotation center of the parts
void updateBoundingBox();