mirror of
https://github.com/osukey/osukey.git
synced 2025-05-05 21:57:24 +09:00
Simplify implementation
This commit is contained in:
parent
3680b9a380
commit
f77de7d880
@ -254,21 +254,10 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
{
|
{
|
||||||
Debug.Assert(!clickSelectionBegan);
|
Debug.Assert(!clickSelectionBegan);
|
||||||
|
|
||||||
bool hoveringSelected = false;
|
// If a select blueprint is already hovered, disallow changes in selection.
|
||||||
|
if (selectionHandler.SelectedBlueprints.Any(s => s.IsHovered))
|
||||||
|
return;
|
||||||
|
|
||||||
// Make sure any already-selected blueprints aren't being hovered over
|
|
||||||
foreach (SelectionBlueprint selected in selectionHandler.SelectedBlueprints)
|
|
||||||
{
|
|
||||||
if (selected.IsHovered)
|
|
||||||
{
|
|
||||||
hoveringSelected = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Attempt a new selection at the mouse position
|
|
||||||
if (!hoveringSelected)
|
|
||||||
{
|
|
||||||
foreach (SelectionBlueprint blueprint in selectionBlueprints.AliveBlueprints)
|
foreach (SelectionBlueprint blueprint in selectionBlueprints.AliveBlueprints)
|
||||||
{
|
{
|
||||||
if (blueprint.IsHovered)
|
if (blueprint.IsHovered)
|
||||||
@ -279,7 +268,6 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Finishes the current blueprint selection.
|
/// Finishes the current blueprint selection.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user