Skip to content

Commit

Permalink
the root cause if cannot enter editor is caused by `KaraokePlayfieldA…
Browse files Browse the repository at this point in the history
…djustmentContainer` need the DI, but not provided because its been created in another place.

the better solution might be create default playfield adjustment container.
  • Loading branch information
andy840119 committed Feb 6, 2022
1 parent 03fc9e0 commit 8ce7000
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ public DrawableKaraokeEditorRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnly
bindableDisplayTranslateToggle.BindValueChanged(x => { Session.SetValue(KaraokeRulesetSession.UseTranslate, x.NewValue); });
}

public override DrawableHitObject<KaraokeHitObject> CreateDrawableRepresentation(KaraokeHitObject h) => null;

protected override Playfield CreatePlayfield() => new KaraokeEditorPlayfield();

[BackgroundDependencyLoader]
Expand All @@ -44,5 +42,8 @@ private void load(KaraokeRulesetEditConfigManager editConfigManager)
editConfigManager.BindWith(KaraokeRulesetEditSetting.DisplayRomaji, bindableDisplayRomajiToggle);
editConfigManager.BindWith(KaraokeRulesetEditSetting.DisplayTranslate, bindableDisplayTranslateToggle);
}

// todo: use default adjustment container because DrawableEditorRulesetWrapper will create it but contains no KaraokeRulesetConfigManager
public override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new();
}
}

0 comments on commit 8ce7000

Please sign in to comment.