Rename HasAnyButtonPressed to IsAnyButtonPressed
This commit is contained in:
parent
3937b08ae7
commit
547be227a0
5 changed files with 7 additions and 7 deletions
|
@ -889,7 +889,7 @@ namespace Ryujinx.UI.Windows
|
|||
Thread.Sleep(10);
|
||||
assigner.ReadInput();
|
||||
|
||||
if (_mousePressed || keyboard.IsPressed(Ryujinx.Input.Key.Escape) || assigner.HasAnyButtonPressed() || assigner.ShouldCancel())
|
||||
if (_mousePressed || keyboard.IsPressed(Ryujinx.Input.Key.Escape) || assigner.IsAnyButtonPressed() || assigner.ShouldCancel())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -49,9 +49,9 @@ namespace Ryujinx.Input.Assigner
|
|||
CollectButtonStats();
|
||||
}
|
||||
|
||||
public bool HasAnyButtonPressed()
|
||||
public bool IsAnyButtonPressed()
|
||||
{
|
||||
return _detector.HasAnyButtonPressed();
|
||||
return _detector.IsAnyButtonPressed();
|
||||
}
|
||||
|
||||
public bool ShouldCancel()
|
||||
|
@ -123,7 +123,7 @@ namespace Ryujinx.Input.Assigner
|
|||
_stats = new Dictionary<GamepadButtonInputId, InputSummary>();
|
||||
}
|
||||
|
||||
public bool HasAnyButtonPressed()
|
||||
public bool IsAnyButtonPressed()
|
||||
{
|
||||
return _stats.Values.Any(CheckButtonPressed);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Ryujinx.Input.Assigner
|
|||
/// Check if a button was pressed.
|
||||
/// </summary>
|
||||
/// <returns>True if a button was pressed</returns>
|
||||
bool HasAnyButtonPressed();
|
||||
bool IsAnyButtonPressed();
|
||||
|
||||
/// <summary>
|
||||
/// Indicate if the user of this API should cancel operations. This is triggered for example when a gamepad get disconnected or when a user cancel assignation operations.
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace Ryujinx.Input.Assigner
|
|||
_keyboardState = _keyboard.GetKeyboardStateSnapshot();
|
||||
}
|
||||
|
||||
public bool HasAnyButtonPressed()
|
||||
public bool IsAnyButtonPressed()
|
||||
{
|
||||
return GetPressedButton() is not null;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
|
||||
assigner.ReadInput();
|
||||
|
||||
if (assigner.HasAnyButtonPressed() || assigner.ShouldCancel() || (keyboard != null && keyboard.IsPressed(Key.Escape)))
|
||||
if (assigner.IsAnyButtonPressed() || assigner.ShouldCancel() || (keyboard != null && keyboard.IsPressed(Key.Escape)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue