Edit Selection Mode: added actions for moving the selection around the grid (#888)

This commit is contained in:
wisselstem 2023-05-26 20:56:30 +02:00 committed by GitHub
parent 533d56eb6a
commit d2a4dcffce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 92 additions and 0 deletions

View file

@ -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
}
}

View file

@ -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
{