-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add a "Download Replay" button to score context menu #38271
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
base: master
Are you sure you want to change the base?
Changes from 2 commits
ebac5be
92b25b3
a39a9f4
6ccd1f9
4f06fdd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,6 +81,9 @@ | |
| [Resolved] | ||
| private IAPIProvider api { get; set; } = null!; | ||
|
|
||
| [Resolved] | ||
| private ScoreModelDownloader scoreDownloader { get; set; } | ||
|
yorunoken marked this conversation as resolved.
Outdated
|
||
|
|
||
| private const float expanded_right_content_width = 200; | ||
| private const float grade_width = 35; | ||
| private const float username_min_width = 120; | ||
|
|
@@ -128,7 +131,7 @@ | |
| return inputRectangle.Contains(ToLocalSpace(screenSpacePos)); | ||
| } | ||
|
|
||
| public BeatmapLeaderboardScore(ScoreInfo score, bool sheared = true) | ||
|
Check failure on line 134 in osu.Game/Screens/Select/BeatmapLeaderboardScore.cs
|
||
| { | ||
| Score = score; | ||
|
|
||
|
|
@@ -626,6 +629,9 @@ | |
| if (Score.OnlineID > 0) | ||
| items.Add(new OsuMenuItem(CommonStrings.CopyLink, MenuItemType.Standard, () => game?.CopyToClipboard($@"{api.Endpoints.WebsiteUrl}/scores/{Score.OnlineID}"))); | ||
|
|
||
| if (Score.HasOnlineReplay && Score.Files.Count == 0) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This menu item continues to show if the user already has the given replay downloaded, meaning they can keep re-downloading it forever and not be able to tell that it's already downloaded. Unsure how it should be handled UX-wise. Probably best choice user-wise would be disabling the menu item and changing its text to something like "Replay already downloaded" or similar. Not sure.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe it could go through "Replay downloading" -> "Replay downloaded"?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This could work too, sure.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I'd rather hide it if it's already downloaded? In such cases, the "watch replay" context item will be there in its palce.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the watch replay button doesn't show up in leaderboard even if the replay is available locally, I'll be adding it shortly |
||
| items.Add(new OsuMenuItem(SongSelectStrings.DownloadReplay, MenuItemType.Standard, () => scoreDownloader.Download(Score))); | ||
|
|
||
| if (Score.Files.Count <= 0) return items.ToArray(); | ||
|
|
||
| if (items.Count > 0) | ||
|
|
||
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.
UsersStrings.ShowExtraTopRanksDownloadReplay.ToSentence()can be used instead