1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:52:53 +08:00

Merge pull request #2300 from peppy/fix-skin-event-again

Move binding to LoadComplete
This commit is contained in:
Dan Balasescu 2018-03-24 11:19:18 +09:00 committed by GitHub
commit 01a6d772e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

View File

@ -45,6 +45,11 @@ namespace osu.Game.Input.Bindings
private void load(KeyBindingStore keyBindings)
{
store = keyBindings;
}
protected override void LoadComplete()
{
base.LoadComplete();
store.KeyBindingChanged += ReloadMappings;
}

View File

@ -55,14 +55,19 @@ namespace osu.Game.Skinning
var dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
fallbackSource = dependencies.Get<ISkinSource>();
if (fallbackSource != null)
fallbackSource.SourceChanged += onSourceChanged;
dependencies.CacheAs<ISkinSource>(this);
return dependencies;
}
protected override void LoadComplete()
{
base.LoadComplete();
if (fallbackSource != null)
fallbackSource.SourceChanged += onSourceChanged;
}
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);