Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update "Argon" skin gameplay counters to new design #25226

Merged
merged 58 commits into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
12bb4b6
Support retrieving textures in argon skin from game resources
frenzibyte Oct 22, 2023
8ed660d
Remove incorrect logic
frenzibyte Oct 22, 2023
9ca672d
Add "Argon" total score counter
frenzibyte Oct 22, 2023
1f36acc
Add "Argon" accuracy counter
frenzibyte Oct 26, 2023
0aa0562
Add "Argon" combo counter
frenzibyte Oct 26, 2023
daf4a03
Abstractify PP counter logic from the "Triangles" implementation
frenzibyte Oct 26, 2023
56eeb11
Add "Argon" performance points counter
frenzibyte Oct 26, 2023
50af157
Add "Argon" background wedges
frenzibyte Oct 26, 2023
df80b4d
Update "Argon" health display specifications to match design
frenzibyte Oct 26, 2023
e119e04
Update "Argon" skin components layout and use the new components
frenzibyte Oct 26, 2023
07e7d53
Bake external scale factors into glyph scale
frenzibyte Oct 26, 2023
841c5bb
Add modified skin for serialisation test coverage
frenzibyte Oct 26, 2023
caddbac
Merge branch 'master' into gameplay-hud-redesign/counters
peppy Oct 30, 2023
4ae9b40
Update resources
peppy Oct 30, 2023
91cf237
Revert health display settings changes
frenzibyte Nov 3, 2023
1c844a1
Remove health line detail
frenzibyte Nov 4, 2023
58a830f
Revert "Add "Argon" performance points counter"
frenzibyte Nov 4, 2023
a23dfbe
Revert "Abstractify PP counter logic from the "Triangles" implementat…
frenzibyte Nov 4, 2023
6c3169a
Remove PP wedge and logic for gameplay layout
frenzibyte Nov 4, 2023
77f5a4c
Update skin deserialisation archive
frenzibyte Nov 4, 2023
1d4f4cf
Merge branch 'master' into gameplay-hud-redesign/counters
frenzibyte Nov 4, 2023
634795e
Adjust failing test scenes
frenzibyte Nov 4, 2023
01e59d1
Adjust health bar settings on default components initialiser to match…
frenzibyte Nov 6, 2023
754e052
Update argon score wedge design
frenzibyte Nov 6, 2023
4c7db4c
Make score counter right-aligned
frenzibyte Nov 6, 2023
ce36884
Make score wireframes display up to required digits count
frenzibyte Nov 6, 2023
7c1c62b
Remove argon combo wedge and update combo counter position
frenzibyte Nov 6, 2023
0dbba13
Split argon score sprite text and update combo counter design
frenzibyte Nov 6, 2023
cbea2db
Support absolute-sized health bar and use it for default layout
frenzibyte Nov 6, 2023
e6d3085
Update accuracy counter design
frenzibyte Nov 7, 2023
d30bac3
Move "required display digits" feature to reside in argon score counter
frenzibyte Nov 7, 2023
fdc714a
Support percentages and ignore dot characters in wireframes part
frenzibyte Nov 7, 2023
4de5454
Bring back left-side line next to health display
frenzibyte Nov 7, 2023
07b7e13
Place health display in front of the score wedge
frenzibyte Nov 7, 2023
18c71c9
Merge branch 'master' into gameplay-hud-redesign/counters
frenzibyte Nov 7, 2023
d0fea38
Update skin deserialisation archives
frenzibyte Nov 7, 2023
2ef17c5
Remove unused local
frenzibyte Nov 7, 2023
6f5d905
Update argon accuracy counter design
frenzibyte Nov 9, 2023
d3af3c6
Merge branch 'master' into gameplay-hud-redesign/counters
frenzibyte Nov 9, 2023
f31c1c9
Rename and move skinnable line component to a more commomn place
peppy Nov 10, 2023
99d9db5
Use a better default size for line
peppy Nov 10, 2023
6c1d48d
Remove unused function
peppy Nov 10, 2023
7c3a626
Add basic animation for combo counter
peppy Nov 10, 2023
e861681
Adjust argon rolling easings
peppy Nov 10, 2023
7e0b412
Change animation to only affect number portion, add miss animation
peppy Nov 10, 2023
4f90ac1
Reduce the default wireframe opacity a bit
peppy Nov 10, 2023
60df272
Rename `RoundedLine` to `BoxElement` and make more generically useful
peppy Nov 10, 2023
7db14ba
Update resources
peppy Nov 10, 2023
fa59218
Update deserialising test
peppy Nov 10, 2023
b4ec624
Remove width/height bindables from `ArgonWedgePiece`
peppy Nov 10, 2023
67312a2
Remove `ArgonScoreWedge` and use `ArgonWedgePiece` directly
peppy Nov 10, 2023
a02aeed
Adjust combo animation slightly
peppy Nov 10, 2023
b7972e3
Merge branch 'skin-size-editing' into gameplay-hud-redesign/counters
bdach Nov 11, 2023
870e4ce
Fix argon health display not handling invalidation correctly
bdach Nov 11, 2023
ea556ab
Merge branch 'skin-size-editing' into gameplay-hud-redesign/counters
bdach Nov 11, 2023
04a16b3
Merge branch 'master' into gameplay-hud-redesign/counters
peppy Nov 11, 2023
c3201d5
Merge branch 'master' into gameplay-hud-redesign/counters
bdach Nov 11, 2023
3e8c89e
Fix one more reference to removed setting
bdach Nov 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
4 changes: 3 additions & 1 deletion osu.Game.Tests/Skins/SkinDeserialisationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ public class SkinDeserialisationTest
// Covers key counters
"Archives/modified-argon-pro-20230618.osk",
// Covers "Argon" health display
"Archives/modified-argon-pro-20231001.osk"
"Archives/modified-argon-pro-20231001.osk",
// Covers "Argon" score/combo/accuracy/pp counters, and wedges
"Archives/modified-argon-pro-20231026.osk"
};

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
using osu.Game.Rulesets.Osu.Judgements;
using osu.Game.Rulesets.Scoring;
using osu.Game.Screens.Play;
using osu.Game.Screens.Play.HUD;
using osuTK;

namespace osu.Game.Tests.Visual.Gameplay
Expand All @@ -30,7 +29,7 @@ public partial class TestScenePerformancePointsCounter : OsuTestScene

private int iteration;
private Bindable<JudgementResult> lastJudgementResult = new Bindable<JudgementResult>();
private PerformancePointsCounter counter;
private ArgonPerformancePointsCounter counter;

[SetUpSteps]
public void SetUpSteps() => AddStep("create components", () =>
Expand Down Expand Up @@ -66,7 +65,7 @@ public void SetUpSteps() => AddStep("create components", () =>

private void createCounter() => AddStep("Create counter", () =>
{
dependencyContainer.Child = counter = new PerformancePointsCounter
dependencyContainer.Child = counter = new ArgonPerformancePointsCounter
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public partial class TestSceneSkinnableAccuracyCounter : SkinnableHUDComponentTe
[Cached]
private ScoreProcessor scoreProcessor = new ScoreProcessor(new OsuRuleset());

protected override Drawable CreateArgonImplementation() => new ArgonAccuracyCounter();
protected override Drawable CreateDefaultImplementation() => new DefaultAccuracyCounter();
protected override Drawable CreateLegacyImplementation() => new LegacyAccuracyCounter();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public partial class TestSceneSkinnableComboCounter : SkinnableHUDComponentTestS
[Cached]
private ScoreProcessor scoreProcessor = new ScoreProcessor(new OsuRuleset());

protected override Drawable CreateArgonImplementation() => new ArgonComboCounter();
protected override Drawable CreateDefaultImplementation() => new DefaultComboCounter();
protected override Drawable CreateLegacyImplementation() => new LegacyComboCounter();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public partial class TestSceneSkinnableHealthDisplay : SkinnableHUDComponentTest
[Cached(typeof(HealthProcessor))]
private HealthProcessor healthProcessor = new DrainingHealthProcessor(0);

protected override Drawable CreateArgonImplementation() => new ArgonHealthDisplay { Scale = new Vector2(0.6f) };
protected override Drawable CreateArgonImplementation() => new ArgonHealthDisplay { Scale = new Vector2(0.6f), BarLength = { Value = 1f } };
protected override Drawable CreateDefaultImplementation() => new DefaultHealthDisplay { Scale = new Vector2(0.6f) };
protected override Drawable CreateLegacyImplementation() => new LegacyHealthDisplay { Scale = new Vector2(0.6f) };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public partial class TestSceneSkinnableScoreCounter : SkinnableHUDComponentTestS
[Cached(typeof(ScoreProcessor))]
private ScoreProcessor scoreProcessor = TestGameplayState.Create(new OsuRuleset()).ScoreProcessor;

protected override Drawable CreateArgonImplementation() => new ArgonScoreCounter();
protected override Drawable CreateDefaultImplementation() => new DefaultScoreCounter();
protected override Drawable CreateLegacyImplementation() => new LegacyScoreCounter();

Expand Down
62 changes: 62 additions & 0 deletions osu.Game/Screens/Play/ArgonPerformancePointsCounter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// 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.Extensions.LocalisationExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Screens.Play.HUD;
using osu.Game.Skinning;

namespace osu.Game.Screens.Play
{
public partial class ArgonPerformancePointsCounter : GameplayPerformancePointsCounter, ISerialisableDrawable
{
public bool UsesFixedAnchor { get; set; }

[BackgroundDependencyLoader]
private void load()
{
}

protected override IHasText CreateText() => new TextComponent();

private partial class TextComponent : CompositeDrawable, IHasText
{
private readonly OsuSpriteText text;

public LocalisableString Text
{
get => text.Text;
set => text.Text = value;
}

public TextComponent()
{
AutoSizeAxes = Axes.Both;

InternalChild = new FillFlowContainer
{
Direction = FillDirection.Vertical,
Children = new[]
{
new OsuSpriteText
{
Text = BeatmapsetsStrings.ShowScoreboardHeaderspp.ToUpper(),
Font = OsuFont.Torus.With(size: 12, weight: FontWeight.Bold),
},
text = new OsuSpriteText
{
Font = OsuFont.Torus.With(size: 16.8f, weight: FontWeight.Regular),
}
}
};
}
}
}
}
18 changes: 18 additions & 0 deletions osu.Game/Screens/Play/HUD/ArgonAccuracyCounter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// 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;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Skinning;

namespace osu.Game.Screens.Play.HUD
{
public partial class ArgonAccuracyCounter : GameplayAccuracyCounter, ISerialisableDrawable
{
public bool UsesFixedAnchor { get; set; }

protected override OsuSpriteText CreateSpriteText()
=> base.CreateSpriteText().With(s => s.Font = OsuFont.Default.With(size: 19.2f));
}
}
29 changes: 29 additions & 0 deletions osu.Game/Screens/Play/HUD/ArgonComboCounter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// 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.Sprites;
using osu.Framework.Localisation;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Scoring;

namespace osu.Game.Screens.Play.HUD
{
public partial class ArgonComboCounter : ComboCounter
{
[BackgroundDependencyLoader]
private void load(ScoreProcessor scoreProcessor)
{
Current.BindTo(scoreProcessor.Combo);
}

protected override OsuSpriteText CreateSpriteText()
=> base.CreateSpriteText().With(s => s.Font = FontUsage.Default.With(size: 36f));

protected override LocalisableString FormatCount(int count)
{
return $@"{count}x";
}
}
}
27 changes: 27 additions & 0 deletions osu.Game/Screens/Play/HUD/ArgonComboWedge.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// 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;

namespace osu.Game.Screens.Play.HUD
{
public partial class ArgonComboWedge : CompositeDrawable, ISerialisableDrawable
{
public bool UsesFixedAnchor { get; set; }

[BackgroundDependencyLoader]
private void load()
{
AutoSizeAxes = Axes.Both;

InternalChild = new ArgonWedgePiece
{
WedgeWidth = { Value = 186 },
WedgeHeight = { Value = 33 },
};
}
}
}
68 changes: 39 additions & 29 deletions osu.Game/Screens/Play/HUD/ArgonHealthDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
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;
Expand All @@ -28,15 +29,15 @@ public partial class ArgonHealthDisplay : HealthDisplay, ISerialisableDrawable
public bool UsesFixedAnchor { get; set; }

[SettingSource("Bar height")]
public BindableFloat BarHeight { get; } = new BindableFloat(20)
public BindableFloat BarHeight { get; } = new BindableFloat(30)
{
MinValue = 0,
MaxValue = 64,
Precision = 1
};

[SettingSource("Bar length")]
public BindableFloat BarLength { get; } = new BindableFloat(0.98f)
public BindableFloat BarLength { get; } = new BindableFloat(0.35f)
{
frenzibyte marked this conversation as resolved.
Show resolved Hide resolved
MinValue = 0.2f,
MaxValue = 1,
Expand Down Expand Up @@ -100,36 +101,45 @@ private void load()
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;

InternalChild = new Container
InternalChildren = new[]
{
AutoSizeAxes = Axes.Both,
Children = new Drawable[]
new Circle
{
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
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[]
{
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,
},
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,
},
frenzibyte marked this conversation as resolved.
Show resolved Hide resolved
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,
},
}
}
};
}
Expand Down
29 changes: 29 additions & 0 deletions osu.Game/Screens/Play/HUD/ArgonRightWedge.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// 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;

namespace osu.Game.Screens.Play.HUD
{
public partial class ArgonRightWedge : CompositeDrawable, ISerialisableDrawable
{
public bool UsesFixedAnchor { get; set; }

[BackgroundDependencyLoader]
private void load()
{
AutoSizeAxes = Axes.Both;

InternalChild = new ArgonWedgePiece
{
WedgeWidth = { Value = 274 },
WedgeHeight = { Value = 40 },
InvertShear = { Value = true },
EndOpacity = 0.5f,
};
}
}
}
Loading