diff --git a/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs b/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs index 19578bcabb003415f5a12a6eabb76f363357d147..87780cc35899e3d1074b40c97e2be5f62f0152a0 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs @@ -1910,6 +1910,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 03a8c5ae13a775836e52b109f5af1dad026c6478..c863886a2fa8c6604a5e89c2b280dfca301714b9 100644 --- a/Source/Plugins/BuilderModes/Resources/Actions.cfg +++ b/Source/Plugins/BuilderModes/Resources/Actions.cfg @@ -1325,6 +1325,46 @@ 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; +} + +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; +} + +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; +} + +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; +} + //mxd rotateclockwise {