Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 private void FloatSelection()
 {
     if (_selectLayer != null)
     {
         _selectLayer.FloatSelection();
     }
 }
Exemplo n.º 3
0
        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();
        }