mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
Merge branch 'master' into fix-potential-deselection-crash
This commit is contained in:
@ -196,7 +196,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
private void refreshTool()
|
||||
{
|
||||
removePlacement();
|
||||
createPlacement();
|
||||
ensurePlacementCreated();
|
||||
}
|
||||
|
||||
private void updatePlacementPosition()
|
||||
@ -215,15 +215,26 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
{
|
||||
base.Update();
|
||||
|
||||
if (Composer.CursorInPlacementArea)
|
||||
createPlacement();
|
||||
else if (currentPlacement?.PlacementActive == false)
|
||||
removePlacement();
|
||||
|
||||
if (currentPlacement != null)
|
||||
{
|
||||
updatePlacementPosition();
|
||||
switch (currentPlacement.PlacementActive)
|
||||
{
|
||||
case PlacementBlueprint.PlacementState.Waiting:
|
||||
if (!Composer.CursorInPlacementArea)
|
||||
removePlacement();
|
||||
break;
|
||||
|
||||
case PlacementBlueprint.PlacementState.Finished:
|
||||
removePlacement();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (Composer.CursorInPlacementArea)
|
||||
ensurePlacementCreated();
|
||||
|
||||
if (currentPlacement != null)
|
||||
updatePlacementPosition();
|
||||
}
|
||||
|
||||
protected sealed override SelectionBlueprint CreateBlueprintFor(HitObject hitObject)
|
||||
@ -249,7 +260,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
NewCombo.Value = TernaryState.False;
|
||||
}
|
||||
|
||||
private void createPlacement()
|
||||
private void ensurePlacementCreated()
|
||||
{
|
||||
if (currentPlacement != null) return;
|
||||
|
||||
|
@ -133,7 +133,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
var comboColours = skin.GetConfig<GlobalSkinColours, IReadOnlyList<Color4>>(GlobalSkinColours.ComboColours)?.Value ?? Array.Empty<Color4>();
|
||||
var comboColour = combo.GetComboColour(comboColours);
|
||||
|
||||
if (HitObject is IHasDuration)
|
||||
if (HitObject is IHasDuration duration && duration.Duration > 0)
|
||||
circle.Colour = ColourInfo.GradientHorizontal(comboColour, comboColour.Lighten(0.4f));
|
||||
else
|
||||
circle.Colour = comboColour;
|
||||
|
Reference in New Issue
Block a user