From 1c844a155e97059e23cdae6470401d217fa88db3 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Sun, 5 Nov 2023 01:52:12 +0300 Subject: [PATCH] Remove health line detail --- .../Screens/Play/HUD/ArgonHealthDisplay.cs | 64 ++++++++----------- osu.Game/Skinning/ArgonSkin.cs | 4 +- 2 files changed, 29 insertions(+), 39 deletions(-) diff --git a/osu.Game/Screens/Play/HUD/ArgonHealthDisplay.cs b/osu.Game/Screens/Play/HUD/ArgonHealthDisplay.cs index 1a213ddc6f..793d43f7ef 100644 --- a/osu.Game/Screens/Play/HUD/ArgonHealthDisplay.cs +++ b/osu.Game/Screens/Play/HUD/ArgonHealthDisplay.cs @@ -11,7 +11,6 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Lines; -using osu.Framework.Graphics.Shapes; using osu.Framework.Layout; using osu.Framework.Threading; using osu.Framework.Utils; @@ -101,45 +100,36 @@ namespace osu.Game.Screens.Play.HUD RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; - InternalChildren = new[] + InternalChild = new Container { - new Circle + AutoSizeAxes = Axes.Both, + Children = new Drawable[] { - Position = new Vector2(-4f, main_path_radius - 1.5f), - Size = new Vector2(50f, 3f), - }, - new Container - { - AutoSizeAxes = Axes.Both, - Margin = new MarginPadding { Left = 50f }, - Children = new Drawable[] + background = new BackgroundPath { - background = new BackgroundPath - { - PathRadius = main_path_radius, - }, - glowBar = new BarPath - { - BarColour = Color4.White, - GlowColour = main_bar_glow_colour, - Blending = BlendingParameters.Additive, - Colour = ColourInfo.GradientHorizontal(Color4.White.Opacity(0.8f), Color4.White), - PathRadius = 40f, - // Kinda hacky, but results in correct positioning with increased path radius. - Margin = new MarginPadding(-30f), - GlowPortion = 0.9f, - }, - mainBar = new BarPath - { - AutoSizeAxes = Axes.None, - RelativeSizeAxes = Axes.Both, - Blending = BlendingParameters.Additive, - BarColour = main_bar_colour, - GlowColour = main_bar_glow_colour, - PathRadius = main_path_radius, - GlowPortion = 0.6f, - }, - } + PathRadius = main_path_radius, + }, + glowBar = new BarPath + { + BarColour = Color4.White, + GlowColour = main_bar_glow_colour, + Blending = BlendingParameters.Additive, + Colour = ColourInfo.GradientHorizontal(Color4.White.Opacity(0.8f), Color4.White), + PathRadius = 40f, + // Kinda hacky, but results in correct positioning with increased path radius. + Margin = new MarginPadding(-30f), + GlowPortion = 0.9f, + }, + mainBar = new BarPath + { + AutoSizeAxes = Axes.None, + RelativeSizeAxes = Axes.Both, + Blending = BlendingParameters.Additive, + BarColour = main_bar_colour, + GlowColour = main_bar_glow_colour, + PathRadius = main_path_radius, + GlowPortion = 0.6f, + }, } }; } diff --git a/osu.Game/Skinning/ArgonSkin.cs b/osu.Game/Skinning/ArgonSkin.cs index 07d9afffac..f850ae9cbd 100644 --- a/osu.Game/Skinning/ArgonSkin.cs +++ b/osu.Game/Skinning/ArgonSkin.cs @@ -130,8 +130,8 @@ namespace osu.Game.Skinning // elements default to beneath the health bar const float components_x_offset = 50; - health.Anchor = Anchor.TopLeft; - health.Origin = Anchor.TopLeft; + health.Anchor = Anchor.TopCentre; + health.Origin = Anchor.TopCentre; health.Y = 15; if (scoreWedge != null)