Undo and Redo Operations Functional, with some caveats
This commit is contained in:
@@ -14,9 +14,12 @@ namespace SpriteMapEditor.SpriteMapModifications
|
||||
private readonly int xDiff;
|
||||
private readonly int yDiff;
|
||||
|
||||
private List<int> preChangeSelection;
|
||||
private List<int> postChangeSelection;
|
||||
|
||||
public MoveBounds(List<SpriteMapRegion> spritesToMove, int xDifference, int yDifference)
|
||||
{
|
||||
sprites = spritesToMove;
|
||||
sprites = spritesToMove.ToList();
|
||||
xDiff = xDifference;
|
||||
yDiff = yDifference;
|
||||
}
|
||||
@@ -41,5 +44,27 @@ namespace SpriteMapEditor.SpriteMapModifications
|
||||
sprite.Bounds = newBounds;
|
||||
}
|
||||
}
|
||||
|
||||
public List<int> GetPreChangeSelection()
|
||||
{
|
||||
return preChangeSelection;
|
||||
}
|
||||
public void SetPreChangeSelection(List<int> currentSelection)
|
||||
{
|
||||
preChangeSelection = currentSelection;
|
||||
}
|
||||
public List<int> GetPostChangeSelection()
|
||||
{
|
||||
return postChangeSelection;
|
||||
}
|
||||
public void SetPostChangeSelection(List<int> currentSelection)
|
||||
{
|
||||
postChangeSelection = currentSelection;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "Move Sprite Bounds";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user