Example #1
0
        private void StartMove(PointerEventInfo info, ILevelGeometry viewport)
        {
            _initialLocation = new Point((int)info.X - Layer.TileWidth / 2, (int)info.Y - Layer.TileHeight / 2);
            _initialOffset   = _selectLayer.TileSelectionOffset;

            if (!_selectLayer.TileSelection.Floating)
            {
                Command command = new FloatTileSelectionCommand(Layer, _selectLayer);
                History.Execute(command);
            }

            _action = UpdateAction.Move;

            StartAutoScroll(info, viewport);
        }
Example #2
0
        private void CommandFloat()
        {
            if (CommandCanFloat())
            {
                Command command = new FloatTileSelectionCommand(Layer as MultiTileGridLayer, this);

                if (LayerContext != null)
                {
                    LayerContext.History.Execute(command);
                }
                else
                {
                    FloatSelection();
                }
            }
        }
Example #3
0
        private void StartMove(PointerEventInfo info, ILevelGeometry viewport)
        {
            _initialLocation = new Point((int)info.X - Layer.TileWidth / 2, (int)info.Y - Layer.TileHeight / 2);
            _initialOffset = _selectLayer.TileSelectionOffset;

            if (!_selectLayer.TileSelection.Floating) {
                Command command = new FloatTileSelectionCommand(Layer, _selectLayer);
                History.Execute(command);
            }

            _action = UpdateAction.Move;

            StartAutoScroll(info, viewport);
        }