CommmitAdjustChange() public méthode

public CommmitAdjustChange ( ) : void
Résultat void
Exemple #1
0
 public void CommitChange()
 {
     if (CurrentToolMode == ToolMode.AdjustSegmentation)
     {
         TileManager.CommmitAdjustChange();
     }
     else if (CurrentToolMode == ToolMode.SplitSegmentation)
     {
         TileManager.CommmitSplitChange();
     }
 }
Exemple #2
0
        public override void OnKeyDown(System.Windows.Input.KeyEventArgs keyEventArgs, int width, int height)
        {
            var p = new Vector2(0.5f, 0.5f);

            switch (keyEventArgs.Key)
            {
            case System.Windows.Input.Key.W:
                mCurrentlyMovingZ = true;
                break;

            case System.Windows.Input.Key.S:
                mCurrentlyMovingZ = true;
                break;

            case System.Windows.Input.Key.Q:
                mTileManager.ToggleShowBoundaryLines();
                break;

            case System.Windows.Input.Key.A:
                mTileManager.ToggleShowSegmentation();
                break;

            case System.Windows.Input.Key.E:
                mTileManager.IncreaseSegmentationVisibility();
                break;

            case System.Windows.Input.Key.D:
                mTileManager.DecreaseSegmentationVisibility();
                break;

            case System.Windows.Input.Key.Z:
                if (keyEventArgs.KeyboardDevice.Modifiers == System.Windows.Input.ModifierKeys.Control)
                {
                    mTileManager.UndoChange();
                    mTileManager.PrepForAdjust(p);
                }
                break;

            case System.Windows.Input.Key.Y:
                if (keyEventArgs.KeyboardDevice.Modifiers == System.Windows.Input.ModifierKeys.Control)
                {
                    mTileManager.RedoChange();
                    mTileManager.PrepForAdjust(p);
                }
                break;

            case System.Windows.Input.Key.N:
                if (keyEventArgs.KeyboardDevice.Modifiers == System.Windows.Input.ModifierKeys.Control)
                {
                    mTileManager.SelectNewId();
                    mTileManager.PrepForAdjust(p);
                }
                break;

            case System.Windows.Input.Key.Tab:
                mTileManager.CommmitAdjustChange();
                keyEventArgs.Handled = true;
                break;

            case System.Windows.Input.Key.Escape:
                mTileManager.CancelAdjustChange();
                mTileManager.SelectedSegmentId = 0;
                break;

            case System.Windows.Input.Key.OemComma:
            case System.Windows.Input.Key.OemMinus:
            case System.Windows.Input.Key.Subtract:
                mTileManager.DecreaseBrushSize();
                break;

            case System.Windows.Input.Key.OemPeriod:
            case System.Windows.Input.Key.OemPlus:
            case System.Windows.Input.Key.Add:
                mTileManager.IncreaseBrushSize();
                break;
            }

            base.OnKeyDown(keyEventArgs, width, height);
        }