// Constructor public CollisionEdit(Areas.OwnerForm updater, Tilemap tilemap, Point start, Point stop, Point initial, byte[] changes) { this.updater = updater; this.Tilemap = tilemap; // if (start.Y < stop.Y) { this.start = start; this.stop = stop; } else if (start == stop && start.X <= stop.X) { this.start = start; this.stop = stop; } else if (stop.Y < start.Y) { this.start = stop; this.stop = start; } this.initial = initial; this.changes = new byte[changes.Length]; changes.CopyTo(this.changes, 0); // Execute(); }
// Constructor public TilemapEdit(Areas.OwnerForm updater, Tilemap tilemap, int layer, Point start, Point stop, int[][] changes, bool pasting, bool transparent, bool allLayers) { if (updater != null) { state = State.Instance; } else { state = State.Instance2; } this.updater = updater; this.Tilemap = tilemap; this.allLayers = allLayers; if (start.Y < stop.Y) { this.start = start; this.stop = stop; } else if (start == stop && start.X <= stop.X) { this.start = start; this.stop = stop; } else if (stop.Y < start.Y) { this.start = stop; this.stop = start; } this.layer = layer; this.changes = new int[3][]; for (int i = 0; i < 3; i++) { if (changes[i] == null) { continue; } this.changes[i] = new int[changes[i].Length]; changes[i].CopyTo(this.changes[i], 0); } this.pasting = pasting; this.transparent = transparent; Execute(); }
public void CreateAreasWindow() { if (Areas == null || !Areas.Visible) { Cursor.Current = Cursors.WaitCursor; Areas = new Areas.OwnerForm(); if (DockEditors) { Do.AddControl(MainForm.PanelForms, Areas); } else { Areas.Show(); } loadedForms.Add(Areas); Cursor.Current = Cursors.Arrow; } Areas.KeyDown += new KeyEventHandler(editor_KeyDown); Areas.BringToFront(); }