mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 17:53:15 +08:00
Merge pull request #21777 from peppy/add-help-button
Add button to settings to show lazer upgrade guide
This commit is contained in:
commit
0aaffcfcfb
@ -64,6 +64,16 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString RunSetupWizard => new TranslatableString(getKey(@"run_setup_wizard"), @"Run setup wizard");
|
public static LocalisableString RunSetupWizard => new TranslatableString(getKey(@"run_setup_wizard"), @"Run setup wizard");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Learn more about lazer"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString LearnMoreAboutLazer => new TranslatableString(getKey(@"learn_more_about_lazer"), @"Learn more about lazer");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Check out the feature comparison and FAQ"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString LearnMoreAboutLazerTooltip => new TranslatableString(getKey(@"check_out_the_feature_comparison"), @"Check out the feature comparison and FAQ");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// "You are running the latest release ({0})"
|
/// "You are running the latest release ({0})"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Localisation;
|
using osu.Game.Localisation;
|
||||||
using osu.Game.Overlays.Settings.Sections.General;
|
using osu.Game.Overlays.Settings.Sections.General;
|
||||||
|
|
||||||
@ -15,7 +14,10 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
public partial class GeneralSection : SettingsSection
|
public partial class GeneralSection : SettingsSection
|
||||||
{
|
{
|
||||||
[Resolved(CanBeNull = true)]
|
[Resolved(CanBeNull = true)]
|
||||||
private FirstRunSetupOverlay firstRunSetupOverlay { get; set; }
|
private FirstRunSetupOverlay? firstRunSetupOverlay { get; set; }
|
||||||
|
|
||||||
|
[Resolved(CanBeNull = true)]
|
||||||
|
private OsuGame? game { get; set; }
|
||||||
|
|
||||||
public override LocalisableString Header => GeneralSettingsStrings.GeneralSectionHeader;
|
public override LocalisableString Header => GeneralSettingsStrings.GeneralSectionHeader;
|
||||||
|
|
||||||
@ -24,15 +26,24 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
Icon = FontAwesome.Solid.Cog
|
Icon = FontAwesome.Solid.Cog
|
||||||
};
|
};
|
||||||
|
|
||||||
public GeneralSection()
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new SettingsButton
|
new SettingsButton
|
||||||
{
|
{
|
||||||
Text = GeneralSettingsStrings.RunSetupWizard,
|
Text = GeneralSettingsStrings.RunSetupWizard,
|
||||||
|
TooltipText = FirstRunSetupOverlayStrings.FirstRunSetupDescription,
|
||||||
Action = () => firstRunSetupOverlay?.Show(),
|
Action = () => firstRunSetupOverlay?.Show(),
|
||||||
},
|
},
|
||||||
|
new SettingsButton
|
||||||
|
{
|
||||||
|
Text = GeneralSettingsStrings.LearnMoreAboutLazer,
|
||||||
|
TooltipText = GeneralSettingsStrings.LearnMoreAboutLazerTooltip,
|
||||||
|
BackgroundColour = colours.YellowDark,
|
||||||
|
Action = () => game?.ShowWiki(@"Help_centre/Upgrading_to_lazer")
|
||||||
|
},
|
||||||
new LanguageSettings(),
|
new LanguageSettings(),
|
||||||
new UpdateSettings(),
|
new UpdateSettings(),
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user