DecreaseSegmentationVisibility() public méthode

public DecreaseSegmentationVisibility ( ) : void
Résultat void
Exemple #1
0
        public override void OnKeyDown(System.Windows.Input.KeyEventArgs keyEventArgs, int width, int height)
        {
            switch (keyEventArgs.Key)
            {
            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();
                }
                break;

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

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

            case System.Windows.Input.Key.Escape:
                //Unselect this segment
                mTileManager.SelectedSegmentId = 0;
                break;
            }

            base.OnKeyDown(keyEventArgs, width, height);
        }
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.PrepForSplit(p);
                }
                break;

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

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

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

            case System.Windows.Input.Key.Escape:
                mTileManager.CancelSplitChange();
                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);
        }