Add the ability to enter and exit the skin editor via on-screen buttons

This commit is contained in:
Dean Herbert
2021-07-20 19:36:12 +09:00
parent 6cc81c24b4
commit 9c4fbf45e9
4 changed files with 46 additions and 17 deletions

View File

@ -13,6 +13,7 @@ using osu.Framework.Logging;
using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface;
using osu.Game.Skinning;
using osu.Game.Skinning.Editor;
using osuTK;
namespace osu.Game.Overlays.Settings.Sections
@ -57,14 +58,19 @@ namespace osu.Game.Overlays.Settings.Sections
private IBindable<WeakReference<SkinInfo>> managerUpdated;
private IBindable<WeakReference<SkinInfo>> managerRemoved;
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
[BackgroundDependencyLoader(permitNulls: true)]
private void load(OsuConfigManager config, SkinEditorOverlay skinEditor)
{
FlowContent.Spacing = new Vector2(0, 5);
Children = new Drawable[]
{
skinDropdown = new SkinSettingsDropdown(),
new SettingsButton
{
Text = "Skin layout editor",
Action = () => skinEditor?.Toggle(),
},
new ExportSkinButton(),
new SettingsSlider<float, SizeSlider>
{