mirror of
https://github.com/ppy/osu.git
synced 2024-09-21 16:07:24 +08:00
Update remaining usages of playfield height
This commit is contained in:
parent
fa2c33c641
commit
0c03326eaf
@ -63,7 +63,7 @@ namespace osu.Game.Rulesets.Taiko.Mods
|
|||||||
/// </param>
|
/// </param>
|
||||||
private Vector2 adjustSizeForPlayfieldAspectRatio(float size)
|
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)
|
protected override void UpdateFlashlightSize(float size)
|
||||||
|
@ -5,7 +5,6 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Rulesets.Taiko.UI;
|
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
@ -13,14 +12,12 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
|
|||||||
{
|
{
|
||||||
public partial class TaikoLegacyHitTarget : CompositeDrawable
|
public partial class TaikoLegacyHitTarget : CompositeDrawable
|
||||||
{
|
{
|
||||||
private Container content = null!;
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(ISkinSource skin)
|
private void load(ISkinSource skin)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
|
||||||
InternalChild = content = new Container
|
InternalChild = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Anchor = Anchor.Centre,
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user