Merge pull request #3533 from peppy/fix-button-disable-regression

Fix gameplay mouse button disable setting no longer having any effect
This commit is contained in:
Dan Balasescu 2018-10-04 16:31:30 +09:00 committed by GitHub
commit 5fd0b29d9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,12 +73,10 @@ namespace osu.Game.Rulesets.UI
#region IHasReplayHandler
private ReplayInputHandler replayInputHandler;
public ReplayInputHandler ReplayInputHandler
{
get
{
return replayInputHandler;
}
get => replayInputHandler;
set
{
if (replayInputHandler != null) RemoveHandler(replayInputHandler);
@ -220,6 +218,13 @@ namespace osu.Game.Rulesets.UI
return base.OnMouseUp(e);
}
protected override bool Handle(UIEvent e)
{
if (mouseDisabled.Value && e is MouseDownEvent me && (me.Button == MouseButton.Left || me.Button == MouseButton.Right)) return false;
return base.Handle(e);
}
#endregion
#region Key Counter Attachment
@ -269,7 +274,7 @@ namespace osu.Game.Rulesets.UI
}
public class RulesetInputManagerInputState<T> : InputState
where T : struct
where T : struct
{
public ReplayState<T> LastReplayState;