Edit Selection Mode: added support for (counter)clockwise rotation actions (#900)

This commit is contained in:
wisselstem 2023-06-09 09:54:23 +02:00 committed by GitHub
parent e9f66baf08
commit 0d4cecc134
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 2 deletions

View file

@ -2346,6 +2346,30 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.RedrawDisplay();
}
[BeginAction("rotateclockwise")]
public void RotateCW()
{
rotation += Angle2D.DegToRad(5);
// Update
UpdateGeometry();
UpdateRectangleComponents();
General.Map.Map.Update();
General.Interface.RedrawDisplay();
}
[BeginAction("rotatecounterclockwise")]
public void RotateCCW()
{
rotation -= Angle2D.DegToRad(5);
// Update
UpdateGeometry();
UpdateRectangleComponents();
General.Map.Map.Update();
General.Interface.RedrawDisplay();
}
#endregion
}
}

View file

@ -1317,7 +1317,7 @@ rotateclockwise
{
title = "Rotate Clockwise";
category = "edit";
description = "Rotates selected or highlighted things clockwise. Also rotates floor/ceiling textures in UDMF map format.";
description = "Rotates selected or highlighted things clockwise. Also rotates floor/ceiling textures in UDMF map format, and rotates the selection in Edit Selection mode.";
allowkeys = true;
allowmouse = false;
allowscroll = true;
@ -1330,7 +1330,7 @@ rotatecounterclockwise
{
title = "Rotate Counterclockwise";
category = "edit";
description = "Rotates selected or highlighted things counterclockwise. Also rotates floor/ceiling textures in UDMF map format.";
description = "Rotates selected or highlighted things counterclockwise. Also rotates floor/ceiling textures in UDMF map format, and rotates the selection in Edit Selection mode.";
allowkeys = true;
allowmouse = false;
allowscroll = true;