1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-27 19:35:15 +08:00

Add argon health display to default skin layout

This commit is contained in:
Dean Herbert 2023-10-06 18:46:50 +09:00
parent 71be3c8f8b
commit 3f2a00d90d
No known key found for this signature in database
2 changed files with 11 additions and 4 deletions

View File

@ -30,16 +30,15 @@ namespace osu.Game.Screens.Play.HUD
public bool UsesFixedAnchor { get; set; } public bool UsesFixedAnchor { get; set; }
[SettingSource("Bar height")] [SettingSource("Bar height")]
public BindableFloat BarHeight { get; } = new BindableFloat public BindableFloat BarHeight { get; } = new BindableFloat(20)
{ {
Default = 32,
MinValue = 0, MinValue = 0,
MaxValue = 64, MaxValue = 64,
Precision = 1 Precision = 1
}; };
[SettingSource("Bar length")] [SettingSource("Bar length")]
public BindableFloat BarLength { get; } = new BindableFloat(1) public BindableFloat BarLength { get; } = new BindableFloat(0.98f)
{ {
MinValue = 0.2f, MinValue = 0.2f,
MaxValue = 1, MaxValue = 1,

View File

@ -109,6 +109,7 @@ namespace osu.Game.Skinning
case SkinComponentsContainerLookup.TargetArea.MainHUDComponents: case SkinComponentsContainerLookup.TargetArea.MainHUDComponents:
var skinnableTargetWrapper = new DefaultSkinComponentsContainer(container => var skinnableTargetWrapper = new DefaultSkinComponentsContainer(container =>
{ {
var health = container.OfType<ArgonHealthDisplay>().FirstOrDefault();
var score = container.OfType<DefaultScoreCounter>().FirstOrDefault(); var score = container.OfType<DefaultScoreCounter>().FirstOrDefault();
var accuracy = container.OfType<DefaultAccuracyCounter>().FirstOrDefault(); var accuracy = container.OfType<DefaultAccuracyCounter>().FirstOrDefault();
var combo = container.OfType<DefaultComboCounter>().FirstOrDefault(); var combo = container.OfType<DefaultComboCounter>().FirstOrDefault();
@ -128,6 +129,13 @@ namespace osu.Game.Skinning
score.Position = new Vector2(0, vertical_offset); score.Position = new Vector2(0, vertical_offset);
if (health != null)
{
health.Origin = Anchor.TopCentre;
health.Anchor = Anchor.TopCentre;
health.Y = 5;
}
if (ppCounter != null) if (ppCounter != null)
{ {
ppCounter.Y = score.Position.Y + ppCounter.ScreenSpaceDeltaToParentSpace(score.ScreenSpaceDrawQuad.Size).Y - 4; ppCounter.Y = score.Position.Y + ppCounter.ScreenSpaceDeltaToParentSpace(score.ScreenSpaceDrawQuad.Size).Y - 4;
@ -191,7 +199,7 @@ namespace osu.Game.Skinning
new DefaultComboCounter(), new DefaultComboCounter(),
new DefaultScoreCounter(), new DefaultScoreCounter(),
new DefaultAccuracyCounter(), new DefaultAccuracyCounter(),
new DefaultHealthDisplay(), new ArgonHealthDisplay(),
new ArgonSongProgress(), new ArgonSongProgress(),
new ArgonKeyCounterDisplay(), new ArgonKeyCounterDisplay(),
new BarHitErrorMeter(), new BarHitErrorMeter(),