mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 16:02:58 +08:00
Only show first run setup once per install
This commit is contained in:
parent
3378c91901
commit
e2da1d76ca
@ -134,6 +134,8 @@ namespace osu.Game.Configuration
|
||||
|
||||
SetDefault(OsuSetting.Version, string.Empty);
|
||||
|
||||
SetDefault(OsuSetting.ShowFirstRunSetup, true);
|
||||
|
||||
SetDefault(OsuSetting.ScreenshotFormat, ScreenshotFormat.Jpg);
|
||||
SetDefault(OsuSetting.ScreenshotCaptureMenuCursor, false);
|
||||
|
||||
@ -308,6 +310,7 @@ namespace osu.Game.Configuration
|
||||
BeatmapListingCardSize,
|
||||
ToolbarClockDisplayMode,
|
||||
Version,
|
||||
ShowFirstRunSetup,
|
||||
ShowConvertedBeatmaps,
|
||||
Skin,
|
||||
ScreenshotFormat,
|
||||
|
@ -6,6 +6,7 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -15,6 +16,7 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
@ -42,6 +44,9 @@ namespace osu.Game.Overlays
|
||||
[Resolved]
|
||||
private INotificationOverlay notificationOverlay { get; set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private OsuConfigManager config { get; set; } = null!;
|
||||
|
||||
private ScreenStack? stack;
|
||||
|
||||
public PurpleTriangleButton NextButton = null!;
|
||||
@ -50,6 +55,8 @@ namespace osu.Game.Overlays
|
||||
[Cached]
|
||||
private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple);
|
||||
|
||||
private readonly Bindable<bool> showFirstRunSetup = new Bindable<bool>();
|
||||
|
||||
private int? currentStepIndex;
|
||||
|
||||
private const float scale_when_hidden = 0.9f;
|
||||
@ -216,9 +223,14 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
config.BindWith(OsuSetting.ShowFirstRunSetup, showFirstRunSetup);
|
||||
|
||||
if (showFirstRunSetup.Value)
|
||||
{
|
||||
// if we are valid for display, only do so after reaching the main menu.
|
||||
performer.PerformFromScreen(_ => { Show(); }, new[] { typeof(MainMenu) });
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
@ -330,6 +342,7 @@ namespace osu.Game.Overlays
|
||||
}
|
||||
else
|
||||
{
|
||||
showFirstRunSetup.Value = false;
|
||||
currentStepIndex = null;
|
||||
Hide();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user