mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 05:36:59 -04:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user