Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/SMAPI/Framework/ModHelpers/InputHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,10 @@ public SButtonState GetState(SButton button)
{
return this.CurrentInputState().GetState(button);
}

/// <inheritdoc />
public void OverrideButton(SButton button, bool setDown)
{
this.CurrentInputState().OverrideButton(button, setDown);
}
}
5 changes: 5 additions & 0 deletions src/SMAPI/IInputHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,9 @@ public interface IInputHelper : IModLinked
/// <summary>Get the state of a button.</summary>
/// <param name="button">The button to check.</param>
SButtonState GetState(SButton button);

/// <summary>Override the state of a button.</summary>
/// <param name="button">The button to override.</param>
/// <param name="setDown">A new button state.</param>
void OverrideButton(SButton button, bool setDown);
}