-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add support for displaying "system title" on main menu #26172
Conversation
d40290d
to
a3f720b
Compare
public class GetSystemTitleRequest : OsuJsonWebRequest<APISystemTitle> | ||
{ | ||
public GetSystemTitleRequest() | ||
: base(@"https://assets.ppy.sh/lazer-status.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Astute readers will inevitably point out that this (a) doesn't exist yet, (b) is not an API call.
I agreed upon doing this in this way with @peppy beforehand. Can be tested via e.g. python3 -m http.server
or something (and changing URL, and probably also allowing insecure requests).
osu.Game/Screens/Menu/SystemTitle.cs
Outdated
Current.BindValueChanged(_ => loadNewImage(), true); | ||
|
||
checkForUpdates(); | ||
Scheduler.AddDelayed(checkForUpdates, TimeSpan.FromMinutes(15).TotalMilliseconds, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this polling is necessary. Probably can be removed if just a once-off call at startup is deemed acceptable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refreshing is best. It will already only attempt a refresh when returning to the main menu, which should be pretty fine. I'd almost say to just check each time we return, but I guess a bit of delay is worth having.
dependencies.Cache(versionManager = new VersionManager { Depth = int.MinValue }); | ||
loadComponentSingleFile(versionManager, ScreenContainer.Add); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This excursion is to prevent the version display on the bottom and the system title stepping on each other.
be14d8b
to
ef39759
Compare
6ccd5d9
to
6684987
Compare
Name will not tell readers much, but the example screenshot below should.