Trigger touch on click key area

This commit is contained in:
pikokr
2021-12-28 22:35:45 +09:00
parent 59b4aea5f9
commit 62d6bb8c2e
2 changed files with 23 additions and 20 deletions

View File

@ -136,24 +136,6 @@ namespace osu.Game.Rulesets.Mania.UI
{
}
private ManiaInputManager.RulesetKeyBindingContainer rulesetKeyBindingContainer { get; set; }
private ManiaInputManager.RulesetKeyBindingContainer getRulesetKeyBindingContainer()
{
return rulesetKeyBindingContainer ??= ((ManiaInputManager)GetContainingInputManager()).GetKeyBindingContainer();
}
protected override bool OnTouchDown(TouchDownEvent e)
{
getRulesetKeyBindingContainer().TriggerPressed(Action.Value);
return base.OnTouchDown(e);
}
protected override void OnTouchUp(TouchUpEvent e)
{
getRulesetKeyBindingContainer().TriggerReleased(Action.Value);
}
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos)
// This probably shouldn't exist as is, but the columns in the stage are separated by a 1px border
=> DrawRectangle.Inflate(new Vector2(Stage.COLUMN_SPACING / 2, 0)).Contains(ToLocalSpace(screenSpacePos));