Пример #1
0
 private void SwapTile(TileWindow wnd)
 {
     wnd.Selected  = true;
     Transfer.Dest = wnd.CurrentSelection();
     Transfer.Swap();
     Draw();
 }
Пример #2
0
 public Selection Cancel()
 {
     // maybe clear inputcontrolstab sample?
     _orgWnd.Cursor   = null;
     _orgWnd.Selected = true;
     return(_orgWnd.CurrentSelection());
 }
Пример #3
0
        public void PasteTile(TileWindow wnd)
        {
            wnd.Selected  = true;
            Transfer.Dest = wnd.CurrentSelection();
            Transfer.Paste();

            if (wnd == spriteWnd && Transfer.Completed)
            {
                toolBox.Switch = true;
            }

            Draw();
        }
Пример #4
0
        private void ShowMenuAt(TileWindow wnd, int x, int y)
        {
            bool wasOob;

            wnd.Position = wnd.GetPosition(x, y, out wasOob);
            if (wasOob)
            {
                ClearSelection();
                SetSample(null);
                return;
            }

            if (wnd == inputWnd)
            {
                SetSample(inputWnd.PieceAt(inputWnd.Position) as Tile);
            }

            Transfer.Source = wnd.CurrentSelection();
            if (wnd.EdgeOf(wnd.Position) == EdgeKind.None)
            {
                wnd.ShowMenu(x, y);
            }
        }
Пример #5
0
 public void CopyTile(TileWindow wnd)
 {
     wnd.Selected    = true;
     Transfer.Source = wnd.CurrentSelection();
     Transfer.Start();
 }