diff --git a/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs b/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs index 0cc55cf44b22e6c3c4e793b8775c3620f79be791..d9de9c4e88b70afc70bd47e5b06893e39d491d19 100755 --- a/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs @@ -2298,6 +2298,54 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.RedrawDisplay(); } + [BeginAction("moveselectionup")] + public void MoveSelectionUp() + { + offset.y += General.Map.Grid.GridSize; + + // Update + UpdateGeometry(); + UpdateRectangleComponents(); + General.Map.Map.Update(); + General.Interface.RedrawDisplay(); + } + + [BeginAction("moveselectiondown")] + public void MoveSelectionDown() + { + offset.y -= General.Map.Grid.GridSize; + + // Update + UpdateGeometry(); + UpdateRectangleComponents(); + General.Map.Map.Update(); + General.Interface.RedrawDisplay(); + } + + [BeginAction("moveselectionleft")] + public void MoveSelectionLeft() + { + offset.x -= General.Map.Grid.GridSize; + + // Update + UpdateGeometry(); + UpdateRectangleComponents(); + General.Map.Map.Update(); + General.Interface.RedrawDisplay(); + } + + [BeginAction("moveselectionright")] + public void MoveSelectionRight() + { + offset.x += General.Map.Grid.GridSize; + + // Update + UpdateGeometry(); + UpdateRectangleComponents(); + General.Map.Map.Update(); + General.Interface.RedrawDisplay(); + } + #endregion } } diff --git a/Source/Plugins/BuilderModes/Resources/Actions.cfg b/Source/Plugins/BuilderModes/Resources/Actions.cfg index 050a66ea02c8f7f4aa37e21c431fa8da62f90562..8b640fd1b621567591cbdc2a9bd3712be0d1a62f 100755 --- a/Source/Plugins/BuilderModes/Resources/Actions.cfg +++ b/Source/Plugins/BuilderModes/Resources/Actions.cfg @@ -1268,6 +1268,50 @@ flipselectionh allowscroll = true; } +moveselectionup +{ + title = "Move Selection Up by Grid Size"; + category = "edit"; + description = "Moves the selection in Edit Selection mode up by the current grid size."; + allowkeys = true; + allowmouse = true; + allowscroll = true; + repeat = true; +} + +moveselectiondown +{ + title = "Move Selection Down by Grid Size"; + category = "edit"; + description = "Moves the selection in Edit Selection mode down by the current grid size."; + allowkeys = true; + allowmouse = true; + allowscroll = true; + repeat = true; +} + +moveselectionleft +{ + title = "Move Selection Left by Grid Size"; + category = "edit"; + description = "Moves the selection in Edit Selection mode left by the current grid size."; + allowkeys = true; + allowmouse = true; + allowscroll = true; + repeat = true; +} + +moveselectionright +{ + title = "Move Selection Right by Grid Size"; + category = "edit"; + description = "Moves the selection in Edit Selection mode right by the current grid size."; + allowkeys = true; + allowmouse = true; + allowscroll = true; + repeat = true; +} + //mxd rotateclockwise {