mirror of
https://github.com/ppy/osu.git
synced 2026-06-06 06:23:41 +08:00
Move quick action settings into own subsection
This commit is contained in:
@@ -29,6 +29,11 @@ namespace osu.Game.Localisation
|
||||
/// </summary>
|
||||
public static LocalisableString Prefer24HourTimeDisplay => new TranslatableString(getKey(@"prefer_24_hour_time_display"), @"Prefer 24-hour time display");
|
||||
|
||||
/// <summary>
|
||||
/// "Quick Actions"
|
||||
/// </summary>
|
||||
public static LocalisableString QuickActionsHeader => new TranslatableString(getKey(@"quick_actions_header"), @"Quick Actions");
|
||||
|
||||
/// <summary>
|
||||
/// "Updates"
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. 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.Localisation;
|
||||
using osu.Game.Online.Chat;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.General
|
||||
{
|
||||
public partial class QuickActionSettings : SettingsSubsection
|
||||
{
|
||||
[Resolved(CanBeNull = true)]
|
||||
private FirstRunSetupOverlay? firstRunSetupOverlay { get; set; }
|
||||
|
||||
[Resolved(CanBeNull = true)]
|
||||
private OsuGame? game { get; set; }
|
||||
|
||||
protected override LocalisableString Header => GeneralSettingsStrings.QuickActionsHeader;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
AddRange(new Drawable[]
|
||||
{
|
||||
new SettingsButton
|
||||
{
|
||||
Text = GeneralSettingsStrings.RunSetupWizard,
|
||||
Keywords = new[] { @"first run", @"initial", @"getting started", @"import", @"tutorial", @"recommended beatmaps" },
|
||||
TooltipText = FirstRunSetupOverlayStrings.FirstRunSetupDescription,
|
||||
Action = () => firstRunSetupOverlay?.Show(),
|
||||
},
|
||||
new SettingsButton
|
||||
{
|
||||
Text = GeneralSettingsStrings.LearnMoreAboutLazer,
|
||||
TooltipText = GeneralSettingsStrings.LearnMoreAboutLazerTooltip,
|
||||
BackgroundColour = colours.YellowDark,
|
||||
Action = () => game?.ShowWiki(@"Help_centre/Upgrading_to_lazer")
|
||||
},
|
||||
new SettingsButton
|
||||
{
|
||||
Text = GeneralSettingsStrings.ReportIssue,
|
||||
TooltipText = GeneralSettingsStrings.ReportIssueTooltip,
|
||||
BackgroundColour = colours.YellowDarker,
|
||||
Action = () => game?.OpenUrlExternally(@"https://osu.ppy.sh/community/forums/topics/create?forum_id=5", LinkWarnMode.NeverWarn)
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,19 +7,12 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Online.Chat;
|
||||
using osu.Game.Overlays.Settings.Sections.General;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections
|
||||
{
|
||||
public partial class GeneralSection : SettingsSection
|
||||
{
|
||||
[Resolved(CanBeNull = true)]
|
||||
private FirstRunSetupOverlay? firstRunSetupOverlay { get; set; }
|
||||
|
||||
[Resolved(CanBeNull = true)]
|
||||
private OsuGame? game { get; set; }
|
||||
|
||||
public override LocalisableString Header => CommonStrings.General;
|
||||
|
||||
public override Drawable CreateIcon() => new SpriteIcon
|
||||
@@ -28,33 +21,13 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
};
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load()
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SettingsButton
|
||||
{
|
||||
Text = GeneralSettingsStrings.RunSetupWizard,
|
||||
Keywords = new[] { @"first run", @"initial", @"getting started", @"import", @"tutorial", @"recommended beatmaps" },
|
||||
TooltipText = FirstRunSetupOverlayStrings.FirstRunSetupDescription,
|
||||
Action = () => firstRunSetupOverlay?.Show(),
|
||||
},
|
||||
new SettingsButton
|
||||
{
|
||||
Text = GeneralSettingsStrings.LearnMoreAboutLazer,
|
||||
TooltipText = GeneralSettingsStrings.LearnMoreAboutLazerTooltip,
|
||||
BackgroundColour = colours.YellowDark,
|
||||
Action = () => game?.ShowWiki(@"Help_centre/Upgrading_to_lazer")
|
||||
},
|
||||
new SettingsButton
|
||||
{
|
||||
Text = GeneralSettingsStrings.ReportIssue,
|
||||
TooltipText = GeneralSettingsStrings.ReportIssueTooltip,
|
||||
BackgroundColour = colours.DarkOrange2,
|
||||
Action = () => game?.OpenUrlExternally(@"https://osu.ppy.sh/community/forums/topics/create?forum_id=5", LinkWarnMode.NeverWarn)
|
||||
},
|
||||
new LanguageSettings(),
|
||||
new UpdateSettings(),
|
||||
new QuickActionSettings(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user