mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 22:01:45 +00:00
moo
This commit is contained in:
parent
dcda9cdab3
commit
15693e1ca8
1 changed files with 15 additions and 16 deletions
|
@ -76,7 +76,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
private const float GRIP_SIZE = 9.0f;
|
||||
private const float ZERO_SIZE_ADDITION = 20.0f;
|
||||
private const byte RECTANGLE_ALPHA = 60;
|
||||
private const byte EXTENSION_LINE_ALPHA = 200;
|
||||
private const byte EXTENSION_LINE_ALPHA = 150;
|
||||
private readonly Cursor[] RESIZE_CURSORS = { Cursors.SizeNS, Cursors.SizeNWSE, Cursors.SizeWE, Cursors.SizeNESW };
|
||||
|
||||
#endregion
|
||||
|
@ -370,15 +370,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
Vector2D newcorner = TransformedPoint(originalcorners[stickcorner]);
|
||||
offset -= newcorner - oldcorner;
|
||||
|
||||
// Snappedmappos is outside the edgevector of our rectangle?
|
||||
// Then show the extension line so that the user knows what it is aligning to
|
||||
// Show the extension line so that the user knows what it is aligning to
|
||||
Vector2D sizefiltered = (size * resizefilter);
|
||||
float sizelength = sizefiltered.x + sizefiltered.y;
|
||||
Line2D edgeline = new Line2D(resizeaxis.v1 + resizevector * sizelength, resizeaxis.v1 + resizevector * sizelength - edgevector);
|
||||
float nearestonedge = edgeline.GetNearestOnLine(snappedmappos);
|
||||
if(nearestonedge > 0.5f)
|
||||
extensionline = new Line2D(edgeline.v1, snappedmappos);
|
||||
else if(nearestonedge < 0.5f)
|
||||
else
|
||||
extensionline = new Line2D(edgeline.v2, snappedmappos);
|
||||
|
||||
// Update
|
||||
|
|
Loading…
Reference in a new issue