mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Change "floating fruits" mod to only apply adjustments to the playfield
Avoids things like touch screen inputs also being flipped. Note that these adjustments can't be applied directly to the playfield due to how playfields are used in various rulesets (basically relying on the `PlayfieldAdjustContainer` to get things in the right place). Closes #24000.
This commit is contained in:
parent
361ae15824
commit
08b3c0cce0
@ -21,10 +21,10 @@ namespace osu.Game.Rulesets.Catch.Mods
|
||||
|
||||
public void ApplyToDrawableRuleset(DrawableRuleset<CatchHitObject> drawableRuleset)
|
||||
{
|
||||
drawableRuleset.Anchor = Anchor.Centre;
|
||||
drawableRuleset.Origin = Anchor.Centre;
|
||||
drawableRuleset.PlayfieldAdjustmentContainer.Anchor = Anchor.Centre;
|
||||
drawableRuleset.PlayfieldAdjustmentContainer.Origin = Anchor.Centre;
|
||||
|
||||
drawableRuleset.Scale = new Vector2(1, -1);
|
||||
drawableRuleset.PlayfieldAdjustmentContainer.Scale = new Vector2(1, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -71,6 +71,12 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
private readonly AudioContainer audioContainer = new AudioContainer { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
/// <summary>
|
||||
/// A container which encapsulates the <see cref="Playfield"/> and provides any adjustments to
|
||||
/// ensure correct scale and position.
|
||||
/// </summary>
|
||||
public virtual PlayfieldAdjustmentContainer PlayfieldAdjustmentContainer { get; private set; }
|
||||
|
||||
public override Container FrameStableComponents { get; } = new Container { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
public override IFrameStableClock FrameStableClock => frameStabilityContainer;
|
||||
@ -178,7 +184,7 @@ namespace osu.Game.Rulesets.UI
|
||||
audioContainer.WithChild(KeyBindingInputManager
|
||||
.WithChildren(new Drawable[]
|
||||
{
|
||||
CreatePlayfieldAdjustmentContainer()
|
||||
PlayfieldAdjustmentContainer = CreatePlayfieldAdjustmentContainer()
|
||||
.WithChild(Playfield),
|
||||
Overlays
|
||||
})),
|
||||
|
Loading…
Reference in New Issue
Block a user