mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-28 14:42:16 +00:00
Make flat alignment modes support Edit Selection mode actions
This commit is contained in:
parent
ca46c6b3f5
commit
3c176d2178
2 changed files with 84 additions and 8 deletions
|
@ -937,6 +937,82 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
General.Interface.RedrawDisplay();
|
General.Interface.RedrawDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Flip vertically
|
||||||
|
[BeginAction("flipselectionv")]
|
||||||
|
public void FlipVertically()
|
||||||
|
{
|
||||||
|
scale.y = -scale.y;
|
||||||
|
//offset.y -= texture.Height * scale.y; // This doesn't account for rotated textures yet
|
||||||
|
|
||||||
|
UpdateSectors();
|
||||||
|
General.Interface.RedrawDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Flip horizontally
|
||||||
|
[BeginAction("flipselectionh")]
|
||||||
|
public void FlipHorizontally()
|
||||||
|
{
|
||||||
|
scale.x = -scale.x;
|
||||||
|
//offset.x += texture.Width * scale.x; // This doesn't account for rotated textures yet
|
||||||
|
|
||||||
|
UpdateSectors();
|
||||||
|
General.Interface.RedrawDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
[BeginAction("moveselectionup")]
|
||||||
|
public void MoveSelectionUp()
|
||||||
|
{
|
||||||
|
offset.y -= General.Map.Grid.GridSize;
|
||||||
|
|
||||||
|
UpdateSectors();
|
||||||
|
General.Interface.RedrawDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
[BeginAction("moveselectiondown")]
|
||||||
|
public void MoveSelectionDown()
|
||||||
|
{
|
||||||
|
offset.y += General.Map.Grid.GridSize;
|
||||||
|
|
||||||
|
UpdateSectors();
|
||||||
|
General.Interface.RedrawDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
[BeginAction("moveselectionleft")]
|
||||||
|
public void MoveSelectionLeft()
|
||||||
|
{
|
||||||
|
offset.x += General.Map.Grid.GridSize;
|
||||||
|
|
||||||
|
UpdateSectors();
|
||||||
|
General.Interface.RedrawDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
[BeginAction("moveselectionright")]
|
||||||
|
public void MoveSelectionRight()
|
||||||
|
{
|
||||||
|
offset.x -= General.Map.Grid.GridSize;
|
||||||
|
|
||||||
|
UpdateSectors();
|
||||||
|
General.Interface.RedrawDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
[BeginAction("rotateclockwise")]
|
||||||
|
public void RotateCW()
|
||||||
|
{
|
||||||
|
rotation += Angle2D.DegToRad(5);
|
||||||
|
|
||||||
|
UpdateSectors();
|
||||||
|
General.Interface.RedrawDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
[BeginAction("rotatecounterclockwise")]
|
||||||
|
public void RotateCCW()
|
||||||
|
{
|
||||||
|
rotation -= Angle2D.DegToRad(5);
|
||||||
|
|
||||||
|
UpdateSectors();
|
||||||
|
General.Interface.RedrawDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1323,7 +1323,7 @@ flipselectionv
|
||||||
{
|
{
|
||||||
title = "Flip Selection Vertically";
|
title = "Flip Selection Vertically";
|
||||||
category = "edit";
|
category = "edit";
|
||||||
description = "Flips the selection in Edit Selection mode vertically.";
|
description = "Flips the selection in Edit Selection mode vertically. Also works in Floor/Ceiling Align Mode.";
|
||||||
allowkeys = true;
|
allowkeys = true;
|
||||||
allowmouse = true;
|
allowmouse = true;
|
||||||
allowscroll = true;
|
allowscroll = true;
|
||||||
|
@ -1333,7 +1333,7 @@ flipselectionh
|
||||||
{
|
{
|
||||||
title = "Flip Selection Horizontally";
|
title = "Flip Selection Horizontally";
|
||||||
category = "edit";
|
category = "edit";
|
||||||
description = "Flips the selection in Edit Selection mode horizontally.";
|
description = "Flips the selection in Edit Selection mode horizontally. Also works in Floor/Ceiling Align Mode.";
|
||||||
allowkeys = true;
|
allowkeys = true;
|
||||||
allowmouse = true;
|
allowmouse = true;
|
||||||
allowscroll = true;
|
allowscroll = true;
|
||||||
|
@ -1343,7 +1343,7 @@ moveselectionup
|
||||||
{
|
{
|
||||||
title = "Move Selection Up by Grid Size";
|
title = "Move Selection Up by Grid Size";
|
||||||
category = "edit";
|
category = "edit";
|
||||||
description = "Moves the selection in Edit Selection mode up by the current grid size.";
|
description = "Moves the selection in Edit Selection mode up by the current grid size. Also works in Floor/Ceiling Align Mode.";
|
||||||
allowkeys = true;
|
allowkeys = true;
|
||||||
allowmouse = true;
|
allowmouse = true;
|
||||||
allowscroll = true;
|
allowscroll = true;
|
||||||
|
@ -1354,7 +1354,7 @@ moveselectiondown
|
||||||
{
|
{
|
||||||
title = "Move Selection Down by Grid Size";
|
title = "Move Selection Down by Grid Size";
|
||||||
category = "edit";
|
category = "edit";
|
||||||
description = "Moves the selection in Edit Selection mode down by the current grid size.";
|
description = "Moves the selection in Edit Selection mode down by the current grid size. Also works in Floor/Ceiling Align Mode.";
|
||||||
allowkeys = true;
|
allowkeys = true;
|
||||||
allowmouse = true;
|
allowmouse = true;
|
||||||
allowscroll = true;
|
allowscroll = true;
|
||||||
|
@ -1365,7 +1365,7 @@ moveselectionleft
|
||||||
{
|
{
|
||||||
title = "Move Selection Left by Grid Size";
|
title = "Move Selection Left by Grid Size";
|
||||||
category = "edit";
|
category = "edit";
|
||||||
description = "Moves the selection in Edit Selection mode left by the current grid size.";
|
description = "Moves the selection in Edit Selection mode left by the current grid size. Also works in Floor/Ceiling Align Mode.";
|
||||||
allowkeys = true;
|
allowkeys = true;
|
||||||
allowmouse = true;
|
allowmouse = true;
|
||||||
allowscroll = true;
|
allowscroll = true;
|
||||||
|
@ -1376,7 +1376,7 @@ moveselectionright
|
||||||
{
|
{
|
||||||
title = "Move Selection Right by Grid Size";
|
title = "Move Selection Right by Grid Size";
|
||||||
category = "edit";
|
category = "edit";
|
||||||
description = "Moves the selection in Edit Selection mode right by the current grid size.";
|
description = "Moves the selection in Edit Selection mode right by the current grid size. Also works in Floor/Ceiling Align Mode.";
|
||||||
allowkeys = true;
|
allowkeys = true;
|
||||||
allowmouse = true;
|
allowmouse = true;
|
||||||
allowscroll = true;
|
allowscroll = true;
|
||||||
|
@ -1388,7 +1388,7 @@ rotateclockwise
|
||||||
{
|
{
|
||||||
title = "Rotate Clockwise";
|
title = "Rotate Clockwise";
|
||||||
category = "edit";
|
category = "edit";
|
||||||
description = "Rotates selected or highlighted things clockwise. Also rotates floor/ceiling textures in UDMF map format, and rotates the selection in Edit Selection mode.";
|
description = "Rotates selected or highlighted things clockwise. Also rotates floor/ceiling textures in UDMF map format and Floor/Ceiling Align Mode, and rotates the selection in Edit Selection mode.";
|
||||||
allowkeys = true;
|
allowkeys = true;
|
||||||
allowmouse = false;
|
allowmouse = false;
|
||||||
allowscroll = true;
|
allowscroll = true;
|
||||||
|
@ -1401,7 +1401,7 @@ rotatecounterclockwise
|
||||||
{
|
{
|
||||||
title = "Rotate Counterclockwise";
|
title = "Rotate Counterclockwise";
|
||||||
category = "edit";
|
category = "edit";
|
||||||
description = "Rotates selected or highlighted things counterclockwise. Also rotates floor/ceiling textures in UDMF map format, and rotates the selection in Edit Selection mode.";
|
description = "Rotates selected or highlighted things counterclockwise. Also rotates floor/ceiling textures in UDMF map format and Floor/Ceiling Align Mode, and rotates the selection in Edit Selection mode.";
|
||||||
allowkeys = true;
|
allowkeys = true;
|
||||||
allowmouse = false;
|
allowmouse = false;
|
||||||
allowscroll = true;
|
allowscroll = true;
|
||||||
|
|
Loading…
Reference in a new issue