1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:20:04 +08:00

Fix tests + InspectCode

This commit is contained in:
Long Nguyen 2024-04-05 19:45:16 +07:00
parent 0bafb29e1e
commit 3b279fd4d2
2 changed files with 11 additions and 9 deletions

View File

@ -45,14 +45,14 @@ namespace osu.Game.Rulesets.Mania.Tests.Skinning
AddStep("set tail origin to regular", () =>
{
foreach (var holdNote in CreatedDrawables.SelectMany(d => d.ChildrenOfType<DrawableHoldNote>()))
((Bindable<HoldNoteTailOrigin>)holdNote.Tail.TailOrigin).Value = HoldNoteTailOrigin.Regular;
holdNote.Tail.TailOrigin = HoldNoteTailOrigin.Regular;
});
AddStep("change direction to down", () => ScrollingInfo.Direction.Value = ScrollingDirection.Down);
AddStep("change direction to up", () => ScrollingInfo.Direction.Value = ScrollingDirection.Up);
AddStep("set tail origin to inverted", () =>
{
foreach (var holdNote in CreatedDrawables.SelectMany(d => d.ChildrenOfType<DrawableHoldNote>()))
((Bindable<HoldNoteTailOrigin>)holdNote.Tail.TailOrigin).Value = HoldNoteTailOrigin.Inverted;
holdNote.Tail.TailOrigin = HoldNoteTailOrigin.Inverted;
});
AddStep("change direction to down", () => ScrollingInfo.Direction.Value = ScrollingDirection.Down);
AddStep("change direction to up", () => ScrollingInfo.Direction.Value = ScrollingDirection.Up);

View File

@ -24,7 +24,15 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
private HoldNoteTailOrigin tailOrigin = HoldNoteTailOrigin.Regular;
public HoldNoteTailOrigin TailOrigin => tailOrigin;
public HoldNoteTailOrigin TailOrigin
{
get => tailOrigin;
set
{
tailOrigin = value;
updateTailOrigin();
}
}
public DrawableHoldNoteTail()
: this(null)
@ -38,11 +46,6 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
Origin = Anchor.TopCentre;
}
protected override void LoadComplete()
{
base.LoadComplete();
}
public void UpdateResult() => base.UpdateResult(true);
protected override void CheckForResult(bool userTriggered, double timeOffset) =>
@ -70,7 +73,6 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
{
base.ApplySkin(skin, allowFallback);
tailOrigin = skin.GetConfig<ManiaSkinConfigurationLookup, HoldNoteTailOrigin>(new ManiaSkinConfigurationLookup(LegacyManiaSkinConfigurationLookups.HoldNoteTailOrigin))?.Value ?? HoldNoteTailOrigin.Regular;
updateTailOrigin();
}
protected override void OnDirectionChanged(ValueChangedEvent<ScrollingDirection> e)