Skip to content

Commit

Permalink
Merge pull request #5900 from peppy/fix-performance-overlay-autosize
Browse files Browse the repository at this point in the history
Fix `PerformanceOverlay` autosize not working due to incorrect anchor
  • Loading branch information
frenzibyte authored Jul 6, 2023
2 parents 842799a + 29161e8 commit a4024ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ public FrameStatisticsDisplay(GameThread thread, ArrayPool<Rgba32> uploadPool)

this.uploadPool = uploadPool;

Origin = Anchor.TopRight;
AutoSizeAxes = Axes.Both;
Alpha = alpha_when_active;

Expand Down
10 changes: 9 additions & 1 deletion osu.Framework/Graphics/Performance/PerformanceOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ private void updateState()
Add(infoText = new TextFlowContainer(cp => cp.Font = FrameworkFont.Condensed)
{
Alpha = 0.75f,
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
TextAnchor = Anchor.TopRight,
AutoSizeAxes = Axes.Both,
Expand All @@ -98,7 +99,14 @@ private void updateState()
updateInfoText();

foreach (GameThread t in host.Threads)
Add(new FrameStatisticsDisplay(t, uploadPool) { State = state });
{
Add(new FrameStatisticsDisplay(t, uploadPool)
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
State = state
});
}
}

this.FadeIn(100);
Expand Down

0 comments on commit a4024ed

Please sign in to comment.