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;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Taiko.Skinning
|
|
|
|
{
|
2020-04-23 03:10:26 +00:00
|
|
|
public class TaikoLegacyHitTarget : CompositeDrawable
|
2020-04-21 10:00:34 +00:00
|
|
|
{
|
2020-04-23 04:17:46 +00:00
|
|
|
private Container content;
|
|
|
|
|
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"),
|
|
|
|
Scale = new Vector2(0.73f),
|
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"),
|
|
|
|
Scale = new Vector2(0.7f),
|
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
|
|
|
}
|
|
|
|
}
|