-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31784 from bdach/bss/wizard-appearance
Implement visual appearance of beatmap submission wizard
- Loading branch information
Showing
11 changed files
with
389 additions
and
8 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
osu.Game.Tests/Visual/Editing/TestSceneBeatmapSubmissionOverlay.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Graphics; | ||
using osu.Framework.Graphics.Containers; | ||
using osu.Framework.Testing; | ||
using osu.Game.Screens.Edit.Submission; | ||
using osu.Game.Screens.Footer; | ||
|
||
namespace osu.Game.Tests.Visual.Editing | ||
{ | ||
public partial class TestSceneBeatmapSubmissionOverlay : OsuTestScene | ||
{ | ||
private ScreenFooter footer = null!; | ||
|
||
[SetUpSteps] | ||
public void SetUpSteps() | ||
{ | ||
AddStep("add overlay", () => | ||
{ | ||
var receptor = new ScreenFooter.BackReceptor(); | ||
footer = new ScreenFooter(receptor); | ||
|
||
Child = new DependencyProvidingContainer | ||
{ | ||
RelativeSizeAxes = Axes.Both, | ||
CachedDependencies = new[] { (typeof(ScreenFooter), (object)footer) }, | ||
Children = new Drawable[] | ||
{ | ||
receptor, | ||
new BeatmapSubmissionOverlay | ||
{ | ||
State = { Value = Visibility.Visible, }, | ||
}, | ||
footer, | ||
} | ||
}; | ||
}); | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Localisation; | ||
|
||
namespace osu.Game.Localisation | ||
{ | ||
public static class BeatmapSubmissionStrings | ||
{ | ||
private const string prefix = @"osu.Game.Resources.Localisation.BeatmapSubmission"; | ||
|
||
/// <summary> | ||
/// "Beatmap submission" | ||
/// </summary> | ||
public static LocalisableString BeatmapSubmissionTitle => new TranslatableString(getKey(@"beatmap_submission_title"), @"Beatmap submission"); | ||
|
||
/// <summary> | ||
/// "Share your beatmap with the world!" | ||
/// </summary> | ||
public static LocalisableString BeatmapSubmissionDescription => new TranslatableString(getKey(@"beatmap_submission_description"), @"Share your beatmap with the world!"); | ||
|
||
/// <summary> | ||
/// "Content permissions" | ||
/// </summary> | ||
public static LocalisableString ContentPermissions => new TranslatableString(getKey(@"content_permissions"), @"Content permissions"); | ||
|
||
/// <summary> | ||
/// "I understand" | ||
/// </summary> | ||
public static LocalisableString ContentPermissionsAcknowledgement => new TranslatableString(getKey(@"content_permissions_acknowledgement"), @"I understand"); | ||
|
||
/// <summary> | ||
/// "Frequently asked questions" | ||
/// </summary> | ||
public static LocalisableString FrequentlyAskedQuestions => new TranslatableString(getKey(@"frequently_asked_questions"), @"Frequently asked questions"); | ||
|
||
/// <summary> | ||
/// "Submission settings" | ||
/// </summary> | ||
public static LocalisableString SubmissionSettings => new TranslatableString(getKey(@"submission_settings"), @"Submission settings"); | ||
|
||
/// <summary> | ||
/// "Before you continue, we ask you to check whether the content you are uploading has been cleared for upload. Please understand that you are responsible for the content you upload to the platform and if in doubt, should ask permission from the creators before uploading!" | ||
/// </summary> | ||
public static LocalisableString ContentPermissionsDisclaimer => new TranslatableString(getKey(@"content_permissions_disclaimer"), @"Before you continue, we ask you to check whether the content you are uploading has been cleared for upload. Please understand that you are responsible for the content you upload to the platform and if in doubt, should ask permission from the creators before uploading!"); | ||
|
||
/// <summary> | ||
/// "Check the content usage guidelines for more information" | ||
/// </summary> | ||
public static LocalisableString CheckContentUsageGuidelines => new TranslatableString(getKey(@"check_content_usage_guidelines"), @"Check the content usage guidelines for more information"); | ||
|
||
/// <summary> | ||
/// "Beatmap ranking criteria" | ||
/// </summary> | ||
public static LocalisableString BeatmapRankingCriteria => new TranslatableString(getKey(@"beatmap_ranking_criteria"), @"Beatmap ranking criteria"); | ||
|
||
/// <summary> | ||
/// "Not sure you meet the guidelines? Check the list and speed up the ranking process!" | ||
/// </summary> | ||
public static LocalisableString BeatmapRankingCriteriaDescription => new TranslatableString(getKey(@"beatmap_ranking_criteria_description"), @"Not sure you meet the guidelines? Check the list and speed up the ranking process!"); | ||
|
||
/// <summary> | ||
/// "Submission process" | ||
/// </summary> | ||
public static LocalisableString SubmissionProcess => new TranslatableString(getKey(@"submission_process"), @"Submission process"); | ||
|
||
/// <summary> | ||
/// "Unsure about the submission process? Check out the wiki entry!" | ||
/// </summary> | ||
public static LocalisableString SubmissionProcessDescription => new TranslatableString(getKey(@"submission_process_description"), @"Unsure about the submission process? Check out the wiki entry!"); | ||
|
||
/// <summary> | ||
/// "Mapping help forum" | ||
/// </summary> | ||
public static LocalisableString MappingHelpForum => new TranslatableString(getKey(@"mapping_help_forum"), @"Mapping help forum"); | ||
|
||
/// <summary> | ||
/// "Got some questions about mapping and submission? Ask them in the forums!" | ||
/// </summary> | ||
public static LocalisableString MappingHelpForumDescription => new TranslatableString(getKey(@"mapping_help_forum_description"), @"Got some questions about mapping and submission? Ask them in the forums!"); | ||
|
||
/// <summary> | ||
/// "Modding queues forum" | ||
/// </summary> | ||
public static LocalisableString ModdingQueuesForum => new TranslatableString(getKey(@"modding_queues_forum"), @"Modding queues forum"); | ||
|
||
/// <summary> | ||
/// "Having trouble getting feedback? Why not ask in a mod queue!" | ||
/// </summary> | ||
public static LocalisableString ModdingQueuesForumDescription => new TranslatableString(getKey(@"modding_queues_forum_description"), @"Having trouble getting feedback? Why not ask in a mod queue!"); | ||
|
||
/// <summary> | ||
/// "Where would you like to post your beatmap?" | ||
/// </summary> | ||
public static LocalisableString BeatmapSubmissionTargetCaption => new TranslatableString(getKey(@"beatmap_submission_target_caption"), @"Where would you like to post your beatmap?"); | ||
|
||
/// <summary> | ||
/// "Works in Progress / Help (incomplete, not ready for ranking)" | ||
/// </summary> | ||
public static LocalisableString BeatmapSubmissionTargetWIP => new TranslatableString(getKey(@"beatmap_submission_target_wip"), @"Works in Progress / Help (incomplete, not ready for ranking)"); | ||
|
||
/// <summary> | ||
/// "Pending (complete, ready for ranking)" | ||
/// </summary> | ||
public static LocalisableString BeatmapSubmissionTargetPending => new TranslatableString(getKey(@"beatmap_submission_target_pending"), @"Pending (complete, ready for ranking)"); | ||
|
||
/// <summary> | ||
/// "Receive notifications for discussion replies" | ||
/// </summary> | ||
public static LocalisableString NotifyOnDiscussionReplies => new TranslatableString(getKey(@"notify_for_discussion_replies"), @"Receive notifications for discussion replies"); | ||
|
||
/// <summary> | ||
/// "Load in browser after submission" | ||
/// </summary> | ||
public static LocalisableString LoadInBrowserAfterSubmission => new TranslatableString(getKey(@"load_in_browser_after_submission"), @"Load in browser after submission"); | ||
|
||
/// <summary> | ||
/// "Note: In order to make it possible for users of all osu! versions to enjoy your beatmap, it will be exported in a backwards-compatible format. While we have made efforts to ensure that that process keeps the beatmap playable in its intended form, some data related to features that previous versions of osu! do not support may be lost." | ||
/// </summary> | ||
public static LocalisableString LegacyExportDisclaimer => new TranslatableString(getKey(@"legacy_export_disclaimer"), @"Note: In order to make it possible for users of all osu! versions to enjoy your beatmap, it will be exported in a backwards-compatible format. While we have made efforts to ensure that that process keeps the beatmap playable in its intended form, some data related to features that previous versions of osu! do not support may be lost."); | ||
|
||
private static string getKey(string key) => $@"{prefix}:{key}"; | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
28 changes: 28 additions & 0 deletions
28
osu.Game/Screens/Edit/Submission/BeatmapSubmissionOverlay.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Allocation; | ||
using osu.Game.Overlays; | ||
using osu.Game.Localisation; | ||
|
||
namespace osu.Game.Screens.Edit.Submission | ||
{ | ||
public partial class BeatmapSubmissionOverlay : WizardOverlay | ||
{ | ||
public BeatmapSubmissionOverlay() | ||
: base(OverlayColourScheme.Aquamarine) | ||
{ | ||
} | ||
|
||
[BackgroundDependencyLoader] | ||
private void load() | ||
{ | ||
AddStep<ScreenContentPermissions>(); | ||
AddStep<ScreenFrequentlyAskedQuestions>(); | ||
AddStep<ScreenSubmissionSettings>(); | ||
|
||
Header.Title = BeatmapSubmissionStrings.BeatmapSubmissionTitle; | ||
Header.Description = BeatmapSubmissionStrings.BeatmapSubmissionDescription; | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
osu.Game/Screens/Edit/Submission/ScreenContentPermissions.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Allocation; | ||
using osu.Framework.Graphics; | ||
using osu.Framework.Localisation; | ||
using osu.Game.Graphics; | ||
using osu.Game.Graphics.Containers; | ||
using osu.Game.Graphics.UserInterfaceV2; | ||
using osu.Game.Localisation; | ||
using osu.Game.Overlays; | ||
|
||
namespace osu.Game.Screens.Edit.Submission | ||
{ | ||
[LocalisableDescription(typeof(BeatmapSubmissionStrings), nameof(BeatmapSubmissionStrings.ContentPermissions))] | ||
public partial class ScreenContentPermissions : WizardScreen | ||
{ | ||
[BackgroundDependencyLoader] | ||
private void load(OsuGame? game) | ||
{ | ||
Content.AddRange(new Drawable[] | ||
{ | ||
new OsuTextFlowContainer(cp => cp.Font = OsuFont.Default.With(size: CONTENT_FONT_SIZE)) | ||
{ | ||
RelativeSizeAxes = Axes.X, | ||
AutoSizeAxes = Axes.Y, | ||
Anchor = Anchor.TopCentre, | ||
Origin = Anchor.TopCentre, | ||
Text = BeatmapSubmissionStrings.ContentPermissionsDisclaimer, | ||
}, | ||
new RoundedButton | ||
{ | ||
Anchor = Anchor.TopCentre, | ||
Origin = Anchor.TopCentre, | ||
Width = 450, | ||
Text = BeatmapSubmissionStrings.CheckContentUsageGuidelines, | ||
Action = () => game?.ShowWiki(@"Rules/Content_usage_permissions"), | ||
}, | ||
}); | ||
} | ||
|
||
public override LocalisableString? NextStepText => BeatmapSubmissionStrings.ContentPermissionsAcknowledgement; | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
osu.Game/Screens/Edit/Submission/ScreenFrequentlyAskedQuestions.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Allocation; | ||
using osu.Framework.Graphics; | ||
using osu.Framework.Graphics.Containers; | ||
using osu.Framework.Localisation; | ||
using osu.Game.Graphics.UserInterfaceV2; | ||
using osu.Game.Localisation; | ||
using osu.Game.Online.API; | ||
using osu.Game.Overlays; | ||
using osuTK; | ||
|
||
namespace osu.Game.Screens.Edit.Submission | ||
{ | ||
[LocalisableDescription(typeof(BeatmapSubmissionStrings), nameof(BeatmapSubmissionStrings.FrequentlyAskedQuestions))] | ||
public partial class ScreenFrequentlyAskedQuestions : WizardScreen | ||
{ | ||
[BackgroundDependencyLoader] | ||
private void load(OsuGame? game, IAPIProvider api) | ||
{ | ||
Content.Add(new FillFlowContainer | ||
{ | ||
RelativeSizeAxes = Axes.X, | ||
AutoSizeAxes = Axes.Y, | ||
Direction = FillDirection.Vertical, | ||
Spacing = new Vector2(5), | ||
Children = new Drawable[] | ||
{ | ||
new FormButton | ||
{ | ||
RelativeSizeAxes = Axes.X, | ||
Caption = BeatmapSubmissionStrings.BeatmapRankingCriteriaDescription, | ||
ButtonText = BeatmapSubmissionStrings.BeatmapRankingCriteria, | ||
Action = () => game?.ShowWiki(@"Ranking_Criteria"), | ||
}, | ||
new FormButton | ||
{ | ||
RelativeSizeAxes = Axes.X, | ||
Caption = BeatmapSubmissionStrings.SubmissionProcessDescription, | ||
ButtonText = BeatmapSubmissionStrings.SubmissionProcess, | ||
Action = () => game?.ShowWiki(@"Beatmap_ranking_procedure"), | ||
}, | ||
new FormButton | ||
{ | ||
RelativeSizeAxes = Axes.X, | ||
Caption = BeatmapSubmissionStrings.MappingHelpForumDescription, | ||
ButtonText = BeatmapSubmissionStrings.MappingHelpForum, | ||
Action = () => game?.OpenUrlExternally($@"{api.WebsiteRootUrl}/community/forums/56"), | ||
}, | ||
new FormButton | ||
{ | ||
RelativeSizeAxes = Axes.X, | ||
Caption = BeatmapSubmissionStrings.ModdingQueuesForumDescription, | ||
ButtonText = BeatmapSubmissionStrings.ModdingQueuesForum, | ||
Action = () => game?.OpenUrlExternally($@"{api.WebsiteRootUrl}/community/forums/60"), | ||
}, | ||
}, | ||
}); | ||
} | ||
} | ||
} |
Oops, something went wrong.