mirror of
https://github.com/ppy/osu
synced 2025-03-23 11:27:24 +00:00
Use bounding box of blueprint for computing selection box area
This commit is contained in:
parent
cbc7753f23
commit
07fe99025f
@ -9,6 +9,7 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Cursor;
|
using osu.Framework.Graphics.Cursor;
|
||||||
|
using osu.Framework.Graphics.Primitives;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
@ -332,8 +333,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
|
|
||||||
foreach (var blueprint in selectedBlueprints)
|
foreach (var blueprint in selectedBlueprints)
|
||||||
{
|
{
|
||||||
topLeft = Vector2.ComponentMin(topLeft, ToLocalSpace(blueprint.SelectionQuad.TopLeft));
|
var blueprintRect = blueprint.SelectionQuad.AABBFloat;
|
||||||
bottomRight = Vector2.ComponentMax(bottomRight, ToLocalSpace(blueprint.SelectionQuad.BottomRight));
|
topLeft = Vector2.ComponentMin(topLeft, ToLocalSpace(blueprintRect.TopLeft));
|
||||||
|
bottomRight = Vector2.ComponentMax(bottomRight, ToLocalSpace(blueprintRect.BottomRight));
|
||||||
}
|
}
|
||||||
|
|
||||||
topLeft -= new Vector2(5);
|
topLeft -= new Vector2(5);
|
||||||
|
Loading…
Reference in New Issue
Block a user