Basic functionality for Taiko touch input now complete

This commit is contained in:
Aaron Hong
2022-03-10 05:09:07 -08:00
parent fc2cd78fa2
commit 317869078f
5 changed files with 93 additions and 59 deletions

View File

@ -6,6 +6,7 @@ using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Taiko.Objects;
@ -35,6 +36,8 @@ namespace osu.Game.Rulesets.Taiko.UI
private SkinnableDrawable scroller;
private DrumTouchInputArea drumTouchInputArea;
public DrawableTaikoRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyList<Mod> mods = null)
: base(ruleset, beatmap, mods)
{
@ -53,11 +56,8 @@ namespace osu.Game.Rulesets.Taiko.UI
Depth = float.MaxValue
});
DrumTouchInputArea touchInput = new DrumTouchInputArea(Playfield) {
RelativePositionAxes = Axes.Both,
RelativeSizeAxes = Axes.Both,
};
Overlays.Add(touchInput);
if ((drumTouchInputArea = CreateDrumTouchInputArea()) != null)
KeyBindingInputManager.Add(drumTouchInputArea);
}
protected override void UpdateAfterChildren()
@ -76,6 +76,8 @@ namespace osu.Game.Rulesets.Taiko.UI
return ControlPoints[result];
}
public DrumTouchInputArea CreateDrumTouchInputArea() => new DrumTouchInputArea();
public override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new TaikoPlayfieldAdjustmentContainer();
protected override PassThroughInputManager CreateInputManager() => new TaikoInputManager(Ruleset.RulesetInfo);