From 90b59fcebcc1c74226c0260b18b1069e82793580 Mon Sep 17 00:00:00 2001 From: spherallic Date: Tue, 14 Feb 2023 23:39:45 +0100 Subject: [PATCH] Allow rotation actions in Edit Selection mode --- .../ClassicModes/EditSelectionMode.cs | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs b/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs index 06ea0ab..b473dcf 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs @@ -2179,6 +2179,32 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.RedrawDisplay(); } + //mxd. Rotate clockwise + [BeginAction("rotateclockwise")] + public void RotateCW() + { + rotation += Angle2D.DegToRad(5); + + // Update + UpdateGeometry(); + UpdateRectangleComponents(); + General.Map.Map.Update(); + General.Interface.RedrawDisplay(); + } + + //mxd. Rotate counterclockwise + [BeginAction("rotatecounterclockwise")] + public void RotateCCW() + { + rotation -= Angle2D.DegToRad(5); + + // Update + UpdateGeometry(); + UpdateRectangleComponents(); + General.Map.Map.Update(); + General.Interface.RedrawDisplay(); + } + #endregion } }