2020-04-21 10:00:34 +00:00
|
|
|
// 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 osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
2020-04-23 04:17:46 +00:00
|
|
|
using osu.Game.Rulesets.Taiko.UI;
|
2020-04-21 10:00:34 +00:00
|
|
|
using osu.Game.Skinning;
|
|
|
|
using osuTK;
|
|
|
|
|
2020-12-07 03:30:25 +00:00
|
|
|
namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
|
2020-04-21 10:00:34 +00:00
|
|
|
{
|
2020-04-23 03:10:26 +00:00
|
|
|
public partial class TaikoLegacyHitTarget : CompositeDrawable
|
2020-04-21 10:00:34 +00:00
|
|
|
{
|
2022-11-02 08:07:19 +00:00
|
|
|
private Container content = null!;
|
2020-04-23 04:17:46 +00:00
|
|
|
|
2020-04-21 10:00:34 +00:00
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load(ISkinSource skin)
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both;
|
|
|
|
|
2020-04-23 04:17:46 +00:00
|
|
|
InternalChild = content = new Container
|
2020-04-21 10:00:34 +00:00
|
|
|
{
|
2020-04-23 04:17:46 +00:00
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
Children = new Drawable[]
|
2020-04-21 10:00:34 +00:00
|
|
|
{
|
2020-04-23 04:17:46 +00:00
|
|
|
new Sprite
|
|
|
|
{
|
|
|
|
Texture = skin.GetTexture("approachcircle"),
|
2022-04-02 22:21:48 +00:00
|
|
|
Scale = new Vector2(0.83f),
|
2020-04-27 09:18:11 +00:00
|
|
|
Alpha = 0.47f, // eyeballed to match stable
|
2020-04-23 04:17:46 +00:00
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
},
|
|
|
|
new Sprite
|
|
|
|
{
|
|
|
|
Texture = skin.GetTexture("taikobigcircle"),
|
2022-04-02 22:21:48 +00:00
|
|
|
Scale = new Vector2(0.8f),
|
2020-04-27 09:18:11 +00:00
|
|
|
Alpha = 0.22f, // eyeballed to match stable
|
2020-04-23 04:17:46 +00:00
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
},
|
|
|
|
}
|
2020-04-21 10:00:34 +00:00
|
|
|
};
|
|
|
|
}
|
2020-04-23 04:17:46 +00:00
|
|
|
|
|
|
|
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.DEFAULT_HEIGHT);
|
|
|
|
}
|
2020-04-21 10:00:34 +00:00
|
|
|
}
|
|
|
|
}
|