mirror of
https://github.com/osukey/osukey.git
synced 2025-05-31 10:27:26 +09:00
Fix selecting underneath selected blueprints
This commit is contained in:
parent
621f4387c9
commit
0db34a47f8
@ -254,15 +254,31 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
{
|
{
|
||||||
Debug.Assert(!clickSelectionBegan);
|
Debug.Assert(!clickSelectionBegan);
|
||||||
|
|
||||||
foreach (SelectionBlueprint blueprint in selectionBlueprints.AliveBlueprints)
|
bool hoveringSelected = false;
|
||||||
|
|
||||||
|
// Make sure any already-selected blueprints aren't being hovered over
|
||||||
|
foreach (SelectionBlueprint selected in selectionHandler.SelectedBlueprints)
|
||||||
{
|
{
|
||||||
if (blueprint.IsHovered)
|
if (selected.IsHovered)
|
||||||
{
|
{
|
||||||
selectionHandler.HandleSelectionRequested(blueprint, e.CurrentState);
|
hoveringSelected = true;
|
||||||
clickSelectionBegan = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Attempt a new selection at the mouse position
|
||||||
|
if (!hoveringSelected)
|
||||||
|
{
|
||||||
|
foreach (SelectionBlueprint blueprint in selectionBlueprints.AliveBlueprints)
|
||||||
|
{
|
||||||
|
if (blueprint.IsHovered)
|
||||||
|
{
|
||||||
|
selectionHandler.HandleSelectionRequested(blueprint, e.CurrentState);
|
||||||
|
clickSelectionBegan = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user