mirror of https://github.com/ppy/osu
Fix strong bindable changes for DrumRolls
This commit is contained in:
parent
910326623c
commit
a2eec5d963
|
@ -48,12 +48,11 @@ private void load(OsuColour colours)
|
|||
colourIdle = colours.YellowDark;
|
||||
colourEngaged = colours.YellowDarker;
|
||||
|
||||
updateColour();
|
||||
|
||||
Content.Add(tickContainer = new Container { RelativeSizeAxes = Axes.Both });
|
||||
|
||||
if (MainPiece.Drawable is IHasAccentColour accentMain)
|
||||
accentMain.AccentColour = colourIdle;
|
||||
Content.Add(tickContainer = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Depth = float.MinValue
|
||||
});
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
|
@ -63,6 +62,12 @@ protected override void LoadComplete()
|
|||
OnNewResult += onNewResult;
|
||||
}
|
||||
|
||||
protected override void RecreatePieces()
|
||||
{
|
||||
base.RecreatePieces();
|
||||
updateColour();
|
||||
}
|
||||
|
||||
protected override void AddNestedHitObject(DrawableHitObject hitObject)
|
||||
{
|
||||
base.AddNestedHitObject(hitObject);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
|
@ -25,11 +24,6 @@ public double EndTime
|
|||
/// </summary>
|
||||
public int RequiredHits = 10;
|
||||
|
||||
public override bool IsStrong
|
||||
{
|
||||
set => throw new NotSupportedException($"{nameof(Swell)} cannot be a strong hitobject.");
|
||||
}
|
||||
|
||||
protected override void CreateNestedHitObjects(CancellationToken cancellationToken)
|
||||
{
|
||||
base.CreateNestedHitObjects(cancellationToken);
|
||||
|
|
|
@ -34,7 +34,7 @@ public abstract class TaikoHitObject : HitObject
|
|||
/// Whether this HitObject is a "strong" type.
|
||||
/// Strong hit objects give more points for hitting the hit object with both keys.
|
||||
/// </summary>
|
||||
public virtual bool IsStrong
|
||||
public bool IsStrong
|
||||
{
|
||||
get => IsStrongBindable.Value;
|
||||
set => IsStrongBindable.Value = value;
|
||||
|
|
|
@ -107,6 +107,8 @@ protected override IEnumerable<MenuItem> GetContextMenuItemsForSelection(IEnumer
|
|||
h.IsStrong = false;
|
||||
break;
|
||||
}
|
||||
|
||||
EditorBeatmap?.UpdateHitObject(h);
|
||||
}
|
||||
})
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@ public class SelectionHandler : CompositeDrawable, IKeyBindingHandler<PlatformAc
|
|||
private Drawable outline;
|
||||
|
||||
[Resolved(CanBeNull = true)]
|
||||
private EditorBeatmap editorBeatmap { get; set; }
|
||||
protected EditorBeatmap EditorBeatmap { get; private set; }
|
||||
|
||||
[Resolved(CanBeNull = true)]
|
||||
private IEditorChangeHandler changeHandler { get; set; }
|
||||
|
@ -117,7 +117,7 @@ public void OnReleased(PlatformAction action)
|
|||
internal void HandleSelected(SelectionBlueprint blueprint)
|
||||
{
|
||||
selectedBlueprints.Add(blueprint);
|
||||
editorBeatmap.SelectedHitObjects.Add(blueprint.HitObject);
|
||||
EditorBeatmap.SelectedHitObjects.Add(blueprint.HitObject);
|
||||
|
||||
UpdateVisibility();
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ internal void HandleSelected(SelectionBlueprint blueprint)
|
|||
internal void HandleDeselected(SelectionBlueprint blueprint)
|
||||
{
|
||||
selectedBlueprints.Remove(blueprint);
|
||||
editorBeatmap.SelectedHitObjects.Remove(blueprint.HitObject);
|
||||
EditorBeatmap.SelectedHitObjects.Remove(blueprint.HitObject);
|
||||
|
||||
// We don't want to update visibility if > 0, since we may be deselecting blueprints during drag-selection
|
||||
if (selectedBlueprints.Count == 0)
|
||||
|
@ -165,7 +165,7 @@ private void deleteSelected()
|
|||
changeHandler?.BeginChange();
|
||||
|
||||
foreach (var h in selectedBlueprints.ToList())
|
||||
editorBeatmap?.Remove(h.HitObject);
|
||||
EditorBeatmap?.Remove(h.HitObject);
|
||||
|
||||
changeHandler?.EndChange();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue