1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 14:47:25 +08:00

Update remaining usages of playfield height

This commit is contained in:
Salman Ahmed 2024-01-20 01:25:04 +03:00
parent fa2c33c641
commit 0c03326eaf
2 changed files with 2 additions and 14 deletions

View File

@ -63,7 +63,7 @@ namespace osu.Game.Rulesets.Taiko.Mods
/// </param>
private Vector2 adjustSizeForPlayfieldAspectRatio(float size)
{
return new Vector2(0, size * taikoPlayfield.DrawHeight / TaikoPlayfield.BASE_HEIGHT);
return new Vector2(0, size * taikoPlayfield.Parent!.Scale.Y);
}
protected override void UpdateFlashlightSize(float size)

View File

@ -5,7 +5,6 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Game.Rulesets.Taiko.UI;
using osu.Game.Skinning;
using osuTK;
@ -13,14 +12,12 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
{
public partial class TaikoLegacyHitTarget : CompositeDrawable
{
private Container content = null!;
[BackgroundDependencyLoader]
private void load(ISkinSource skin)
{
RelativeSizeAxes = Axes.Both;
InternalChild = content = new Container
InternalChild = new Container
{
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
@ -46,14 +43,5 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
}
};
}
protected override void Update()
{
base.Update();
// Relying on RelativeSizeAxes.Both + FillMode.Fit doesn't work due to the precise pixel layout requirements.
// This is a bit ugly but makes the non-legacy implementations a lot cleaner to implement.
content.Scale = new Vector2(DrawHeight / TaikoPlayfield.BASE_HEIGHT);
}
}
}