Skip to content

Move FPS timer to top-right, next to console badge#2822

Open
dhimasardinata wants to merge 5 commits intof3d-app:masterfrom
dhimasardinata:fix/fps-timer-position
Open

Move FPS timer to top-right, next to console badge#2822
dhimasardinata wants to merge 5 commits intof3d-app:masterfrom
dhimasardinata:fix/fps-timer-position

Conversation

@dhimasardinata
Copy link

Move the FPS timer from the bottom-left (where it overlaps with the Axis widget X) to the top-right corner, next to the console badge.

When the console badge is visible, the FPS timer is positioned to its left with standard padding. When the console badge is not visible, it is positioned at the screen edge.

Fixes #2803

@mwestphal
Copy link
Member

Hi @dhimasardinata , I think this can be integrated easily, are you around If I review soon ?

@mwestphal mwestphal self-requested a review February 4, 2026 07:23
@dhimasardinata
Copy link
Author

@mwestphal sure, I'm around 👍

@mwestphal
Copy link
Member

Please comment on #2803 so I can assign it to you

Copy link
Member

@mwestphal mwestphal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please comment on the issue.

@mwestphal
Copy link
Member

Nice! You need to update test baselines to account for the move, do you know how to do that ?

https://f3d.app/dev/TESTING

@dhimasardinata
Copy link
Author

Thanks for the heads up! I've updated the TestFPS baseline and verified that all tests are passing now. Let me know if you spot anything else!

@mwestphal
Copy link
Member

I've updated the TestFPS baseline

Im afraid the test is not right because it would result in a different image each time.
Are you sure it passes ?

A solution is to use --font-scale to reduce the size of the diff.
Another solution is to add a font such as this one https://fonts.google.com/specimen/Flow+Block?query=block and use it but it could still result in diff because the number of chars may change, something to try.

Let me know if you need help.

Only offset the FPS counter when the console badge is visible and use the badge size for spacing. Also reduce font scale for TestFPS and update baseline.
@dhimasardinata
Copy link
Author

I updated the FPS offset so it only shifts when the badge is actually visible, and I used the badge size for spacing. I also added --font-scale=0.5 to TestFPS, refreshed the baseline, and re-ran it locally.

@mwestphal
Copy link
Member

I updated the FPS offset so it only shifts when the badge is actually visible, and I used the badge size for spacing. I also added --font-scale=0.5 to TestFPS, refreshed the baseline, and re-ran it locally.

Nice! Let see how CI goes.

@mwestphal
Copy link
Member

\ci fast

@mwestphal mwestphal self-requested a review February 8, 2026 11:01
@mwestphal
Copy link
Member

\ci full

Put console badge lookup on a single line to match formatting.
Use Crosterian test font with a smaller scale for TestFPS and update the baseline.
void ShowBadge();

/**
* Check if the console badge is visible
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Check if the console badge is visible
* Return true if the console badge is visible, false otherwise

@mwestphal
Copy link
Member

@dhimasardinata let me know if you need help making the test work, dont hesitate to join the discord to discuss: https://discord.f3d.app

@dhimasardinata
Copy link
Author

@mwestphal hey, yes i need help getting the test to work😅 thanks!

@mwestphal
Copy link
Member

Just increase the threshold of the test ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move FPS timer next to the console badge instead of below the axis widget

2 participants