Add "Display Time" On-Screen Panel#19021
Merged
Merged
Conversation
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This PR aims to finally complete the work started many years ago with #7475 and #10526 (third time's the charm, hopefully!):
A new option has been added under Settings -> User Interface -> On-Screen Notifications -> Notification Visibility, called "Display Time".
This setting appends to the text of the status panels (more on this below) an indication of the current time, to be shown in the preferred format chosen by the user (HH:MM:SS, HH:MM and their 12-hour variants).
The calculation and refresh of the current time has been gated behind both last value caching and pre-defined update intervals, which depend on the chosen format.
For HH:MM format options, the update happens every minute by also waiting for the next-minute boundary (to prevent the clock from heavily drifting). For the HH:MM:SS format options, I chose a 500ms value.
This should help address all past concerns about the performance impact derived from a per-frame time calculation/refresh.
The category of persistent "notification" that this new setting belongs to - which includes the existing FPS, frame count, memory usage text - has been internally renamed to "On-Screen Panels". This is to differentiate them from "On-Screen Notifications" (temporary on-screen messages/alerts that come and go) and "On-Screen Indicators" (visual elements that refer to content playback, such as the pause, fast-forward and slowmotion on-screen icons).
This paves the way for a possible proposal I was thinking of while working on this: re-grouping these status panels differently, by moving them to a separate "On-Screen Panels" sub-menu and decluttering the "Notification Visibility" list. But that will be for another time...
This PR also fixes a longstanding problem where only the FPS panel pushed Indicator icons (pause, fastforward, etc.) down. Other status panels such as Memory Usage ended up overlapping with those icons if the FPS were not shown.
Related Issues
Fixes #6890
Related Pull Requests
#7475
#10526