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
1 changed files with 10 additions and 5 deletions

View File

@ -73,12 +73,10 @@ public override void HandleInputStateChange(InputStateChangeEvent inputStateChan
#region IHasReplayHandler
private ReplayInputHandler replayInputHandler;
public ReplayInputHandler ReplayInputHandler
{
get
{
return replayInputHandler;
}
get => replayInputHandler;
set
{
if (replayInputHandler != null) RemoveHandler(replayInputHandler);
@ -220,6 +218,13 @@ protected override bool OnMouseUp(MouseUpEvent e)
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 @@ public interface ICanAttachKeyCounter
}
public class RulesetInputManagerInputState<T> : InputState
where T : struct
where T : struct
{
public ReplayState<T> LastReplayState;