From 146225d87eca2222979b892d01074643c2c5b00d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 7 Jun 2022 20:02:26 +0900 Subject: [PATCH] Fix multiple issues with layout and text --- osu.Game/Screens/LatencyComparerScreen.cs | 27 +++++++++++++++++------ 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/osu.Game/Screens/LatencyComparerScreen.cs b/osu.Game/Screens/LatencyComparerScreen.cs index ba3355110d..0af0ab8419 100644 --- a/osu.Game/Screens/LatencyComparerScreen.cs +++ b/osu.Game/Screens/LatencyComparerScreen.cs @@ -12,6 +12,7 @@ using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; +using osu.Framework.Graphics.Sprites; using osu.Framework.Input; using osu.Framework.Input.Events; using osu.Framework.Localisation; @@ -125,7 +126,7 @@ You can click the targets but you don't have to. Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, TextAnchor = Anchor.TopCentre, - Y = 200, + Y = 150, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, }, @@ -225,12 +226,21 @@ private void showResults() float successRate = (float)correctCount / targetRoundCount; bool isPass = successRate > 0.8f; - statusText.AddParagraph($"You scored {correctCount} out of {targetRoundCount} ({successRate:P0})!", cp => cp.Colour = isPass ? colours.Green : colours.Red); - - statusText.AddParagraph($"Level {difficulty} (comparing {mapDifficultyToTargetFrameRate(difficulty):N0}hz with {host.UpdateThread.Clock.FramesPerSecond:N0}hz)", + statusText.AddParagraph($"You scored {correctCount} out of {targetRoundCount} ({successRate:0%})!", cp => cp.Colour = isPass ? colours.Green : colours.Red); + statusText.AddParagraph($"Level {difficulty} ({mapDifficultyToTargetFrameRate(difficulty):N0} hz)", cp => cp.Font = OsuFont.Default.With(size: 24)); - statusText.AddParagraph($"Input: {pollingMax}hz Monitor: {displayMode.RefreshRate:N0}hz Exclusive: {exclusive}", cp => cp.Font = OsuFont.Default.With(size: 15)); + statusText.AddParagraph(string.Empty); + statusText.AddParagraph(string.Empty); + statusText.AddIcon(isPass ? FontAwesome.Regular.CheckCircle : FontAwesome.Regular.TimesCircle, cp => cp.Colour = isPass ? colours.Green : colours.Red); + statusText.AddParagraph(string.Empty); + + statusText.AddParagraph($"Polling: {pollingMax} hz Monitor: {displayMode.RefreshRate:N0} hz Exclusive: {exclusive}", cp => cp.Font = OsuFont.Default.With(size: 15)); + + statusText.AddParagraph($"Input: {host.InputThread.Clock.FramesPerSecond} hz " + + $"Update: {host.UpdateThread.Clock.FramesPerSecond} hz " + + $"Draw: {host.DrawThread.Clock.FramesPerSecond} hz" + , cp => cp.Font = OsuFont.Default.With(size: 15)); string cannotIncreaseReason = string.Empty; @@ -243,9 +253,12 @@ private void showResults() resultsArea.Add(new FillFlowContainer { - RelativeSizeAxes = Axes.Both, - Y = 100, + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Anchor = Anchor.BottomLeft, + Origin = Anchor.BottomLeft, Spacing = new Vector2(20), + Padding = new MarginPadding(20), Children = new Drawable[] { new Button(Key.R)