From 8ce70004ce017f7151f46bec83bf71f83ef0ed1b Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sun, 6 Feb 2022 14:52:06 +0800 Subject: [PATCH] the root cause if cannot enter editor is caused by `KaraokePlayfieldAdjustmentContainer` need the DI, but not provided because its been created in another place. the better solution might be create default playfield adjustment container. --- .../Edit/DrawableKaraokeEditorRuleset.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/Edit/DrawableKaraokeEditorRuleset.cs b/osu.Game.Rulesets.Karaoke/Edit/DrawableKaraokeEditorRuleset.cs index 21b12a2f5..5d20475e4 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/DrawableKaraokeEditorRuleset.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/DrawableKaraokeEditorRuleset.cs @@ -33,8 +33,6 @@ public DrawableKaraokeEditorRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnly bindableDisplayTranslateToggle.BindValueChanged(x => { Session.SetValue(KaraokeRulesetSession.UseTranslate, x.NewValue); }); } - public override DrawableHitObject CreateDrawableRepresentation(KaraokeHitObject h) => null; - protected override Playfield CreatePlayfield() => new KaraokeEditorPlayfield(); [BackgroundDependencyLoader] @@ -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(); } }