1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-29 06:09:59 +08:00

Remove ArgonScoreWedge and use ArgonWedgePiece directly

This commit is contained in:
Dean Herbert
2023-11-10 16:43:47 +09:00
Unverified
parent b4ec62473e
commit 67312a2db9
2 changed files with 16 additions and 47 deletions
@@ -1,37 +0,0 @@
// 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.Game.Skinning;
using osuTK;
namespace osu.Game.Screens.Play.HUD
{
public partial class ArgonScoreWedge : CompositeDrawable, ISerialisableDrawable
{
public bool UsesFixedAnchor { get; set; }
[BackgroundDependencyLoader]
private void load()
{
AutoSizeAxes = Axes.Both;
InternalChildren = new Drawable[]
{
new ArgonWedgePiece
{
WedgeWidth = { Value = 380 },
WedgeHeight = { Value = 72 },
},
new ArgonWedgePiece
{
WedgeWidth = { Value = 380 },
WedgeHeight = { Value = 72 },
Position = new Vector2(4, 5)
},
};
}
}
}
+16 -10
View File
@@ -117,7 +117,7 @@ namespace osu.Game.Skinning
{
var health = container.OfType<ArgonHealthDisplay>().FirstOrDefault();
var healthLine = container.OfType<BoxElement>().FirstOrDefault();
var scoreWedge = container.OfType<ArgonScoreWedge>().FirstOrDefault();
var wedgePieces = container.OfType<ArgonWedgePiece>().ToArray();
var score = container.OfType<ArgonScoreCounter>().FirstOrDefault();
var accuracy = container.OfType<ArgonAccuracyCounter>().FirstOrDefault();
var combo = container.OfType<ArgonComboCounter>().FirstOrDefault();
@@ -144,15 +144,13 @@ namespace osu.Game.Skinning
healthLine.Size = new Vector2(45, 3);
}
if (scoreWedge != null)
{
scoreWedge.Position = new Vector2(-50, 15);
foreach (var wedgePiece in wedgePieces)
wedgePiece.Position += new Vector2(-50, 15);
if (score != null)
{
score.Origin = Anchor.TopRight;
score.Position = new Vector2(components_x_offset + 200, scoreWedge.Y + 30);
}
if (score != null)
{
score.Origin = Anchor.TopRight;
score.Position = new Vector2(components_x_offset + 200, wedgePieces.Last().Y + 30);
}
if (accuracy != null)
@@ -210,7 +208,15 @@ namespace osu.Game.Skinning
{
Children = new Drawable[]
{
new ArgonScoreWedge(),
new ArgonWedgePiece
{
Size = new Vector2(380, 72),
},
new ArgonWedgePiece
{
Size = new Vector2(380, 72),
Position = new Vector2(4, 5)
},
new ArgonScoreCounter(),
new ArgonHealthDisplay(),
new BoxElement(),