-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 #30976 from frenzibyte/hide-some-settings
Hide debug settings in release builds
- Loading branch information
Showing
8 changed files
with
82 additions
and
77 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,19 +1,17 @@ | ||
// 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.Development; | ||
using osu.Framework.Graphics; | ||
using osu.Framework.Graphics.Sprites; | ||
using osu.Framework.Localisation; | ||
using osu.Game.Graphics; | ||
using osu.Game.Localisation; | ||
using osu.Game.Overlays.Settings.Sections.DebugSettings; | ||
|
||
namespace osu.Game.Overlays.Settings.Sections | ||
{ | ||
public partial class DebugSection : SettingsSection | ||
{ | ||
public override LocalisableString Header => DebugSettingsStrings.DebugSectionHeader; | ||
public override LocalisableString Header => @"Debug"; | ||
|
||
public override Drawable CreateIcon() => new SpriteIcon | ||
{ | ||
|
@@ -22,12 +20,12 @@ public partial class DebugSection : SettingsSection | |
|
||
public DebugSection() | ||
{ | ||
Add(new GeneralSettings()); | ||
|
||
if (DebugUtils.IsDebugBuild) | ||
Add(new BatchImportSettings()); | ||
|
||
Add(new MemorySettings()); | ||
Children = new Drawable[] | ||
{ | ||
new GeneralSettings(), | ||
new BatchImportSettings(), | ||
new MemorySettings(), | ||
}; | ||
} | ||
} | ||
} |
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
36 changes: 36 additions & 0 deletions
36
osu.Game/Overlays/Settings/Sections/Maintenance/GeneralSettings.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,36 @@ | ||
// 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.Localisation; | ||
using osu.Framework.Screens; | ||
using osu.Game.Localisation; | ||
using osu.Game.Screens; | ||
using osu.Game.Screens.Import; | ||
using osu.Game.Screens.Utility; | ||
|
||
namespace osu.Game.Overlays.Settings.Sections.Maintenance | ||
{ | ||
public partial class GeneralSettings : SettingsSubsection | ||
{ | ||
protected override LocalisableString Header => CommonStrings.General; | ||
|
||
[BackgroundDependencyLoader] | ||
private void load(IPerformFromScreenRunner? performer) | ||
{ | ||
Children = new[] | ||
{ | ||
new SettingsButton | ||
{ | ||
Text = DebugSettingsStrings.ImportFiles, | ||
Action = () => performer?.PerformFromScreen(menu => menu.Push(new FileImportScreen())) | ||
}, | ||
new SettingsButton | ||
{ | ||
Text = DebugSettingsStrings.RunLatencyCertifier, | ||
Action = () => performer?.PerformFromScreen(menu => menu.Push(new LatencyCertifierScreen())) | ||
} | ||
}; | ||
} | ||
} | ||
} |
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