Move default config tracking calls out of OnScreenDisplay itself

This commit is contained in:
Dean Herbert 2020-11-11 13:51:20 +09:00
parent 6014751e29
commit 324626e097
2 changed files with 7 additions and 11 deletions

View File

@ -627,7 +627,12 @@ protected override void LoadComplete()
loadComponentSingleFile(volume = new VolumeOverlay(), leftFloatingOverlayContent.Add, true);
loadComponentSingleFile(new OnScreenDisplay(), Add, true);
var onScreenDisplay = new OnScreenDisplay();
onScreenDisplay.BeginTracking(this, frameworkConfig);
onScreenDisplay.BeginTracking(this, LocalConfig);
loadComponentSingleFile(onScreenDisplay, Add, true);
loadComponentSingleFile(notifications.With(d =>
{

View File

@ -3,16 +3,14 @@
using System;
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Configuration.Tracking;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osuTK;
using osu.Framework.Graphics.Transforms;
using osu.Framework.Threading;
using osu.Game.Configuration;
using osu.Game.Overlays.OSD;
using osuTK;
namespace osu.Game.Overlays
{
@ -47,13 +45,6 @@ public OnScreenDisplay()
};
}
[BackgroundDependencyLoader]
private void load(FrameworkConfigManager frameworkConfig, OsuConfigManager osuConfig)
{
BeginTracking(this, frameworkConfig);
BeginTracking(this, osuConfig);
}
private readonly Dictionary<(object, IConfigManager), TrackedSettings> trackedConfigManagers = new Dictionary<(object, IConfigManager), TrackedSettings>();
/// <summary>