public void BeginAddPixel() //rozpoczęcie nowego cofania { currUndo = new UndoElement(); currUndo.transform = 0; currUndo.TilesPixels = new List <TilesPixel>(); //tilesMaker.DebugLog("beg"); }
public void AddPixelToUndo(int x = 0, int y = 0, UInt32 color = 0) //dodanie konkretnych pikseli do cofania { //tilesMaker.DebugLog(currUndo.TilesPixels.Count.ToString()); if (currUndo == null) { currUndo = new UndoElement(); currUndo.TilesPixels = new List <TilesPixel>(); } TilesPixel tempPixel = new TilesPixel(x, y, color); currUndo.TilesPixels.Add(tempPixel); }
public void CreateUndo(TransformType transformType, int x = 0, int y = 0, int w = 0, int h = 0, UInt32 color = 0) { UndoElement nextUndo = new UndoElement(); nextUndo.transform = (int)transformType; if (undo.Count >= undoSize) { undo.RemoveAt(0); } undo.Add(nextUndo); }