1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-19 04:13:22 +08:00
osu-lazer/osu.Game/Skinning/ArgonSkinTransformer.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.3 KiB
C#
Raw Normal View History

// 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.Graphics;
2024-06-25 06:01:26 +08:00
using osu.Framework.Graphics.Containers;
using osu.Game.Screens.Play.HUD;
using osuTK;
namespace osu.Game.Skinning
{
public class ArgonSkinTransformer : SkinTransformer
{
public ArgonSkinTransformer(ISkin skin)
: base(skin)
{
}
public override Drawable? GetDrawableComponent(ISkinComponentLookup lookup)
{
2024-06-25 06:01:26 +08:00
if (lookup is SkinComponentsContainerLookup containerLookup
&& containerLookup.Target == SkinComponentsContainerLookup.TargetArea.MainHUDComponents
&& containerLookup.Ruleset != null)
{
2024-06-25 06:01:26 +08:00
return base.GetDrawableComponent(lookup) ?? new Container
{
RelativeSizeAxes = Axes.Both,
Child = new ArgonComboCounter
{
2024-06-25 06:01:26 +08:00
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Position = new Vector2(36, -66),
Scale = new Vector2(1.3f),
},
};
}
return base.GetDrawableComponent(lookup);
}
}
}