public override void Execute() { _selectLayer.RestoreTileSelection(_selection); _selectLayer.FloatSelection(); Rectangle bounds = _selectLayer.TileSelection.Bounds; TileCoord offset = new TileCoord(_centerOffset.X - bounds.Center.X, _centerOffset.Y - bounds.Center.Y); _selectLayer.SetSelectionOffset(offset); }
private void FloatSelection() { if (_selectLayer != null) { _selectLayer.FloatSelection(); } }
public override void Execute() { TileSelection selection = _selectLayer.TileSelection; foreach (KeyValuePair <TileCoord, TileStack> item in selection.Tiles) { TileCoord destCoord = new TileCoord(item.Key.X + selection.Offset.X, item.Key.Y + selection.Offset.Y); _command.QueueReplacement(destCoord, (TileStack)null); } _command.Execute(); _selectLayer.FloatSelection(); }