using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using QURO; namespace SpriteMapEditor.SpriteMapModifications { class RenameSprite : ISpriteMapModification { private readonly Sprite sprite; private readonly string newName; private readonly string oldName; private List preChangeSelection; private List postChangeSelection; public RenameSprite(Sprite spriteToRename, string name) { sprite = spriteToRename; newName = name; oldName = sprite.Name; } public void Do() { sprite.Name = newName; } public void Undo() { sprite.Name = oldName; } public List GetPreChangeSelection() { return preChangeSelection; } public void SetPreChangeSelection(List currentSelection) { preChangeSelection = currentSelection; } public List GetPostChangeSelection() { return postChangeSelection; } public void SetPostChangeSelection(List currentSelection) { postChangeSelection = currentSelection; } public override string ToString() { return "Rename Sprite"; } } }