Rename HasAnyButtonPressed to IsAnyButtonPressed

This commit is contained in:
TSR Berry 2024-04-09 09:23:06 +02:00 committed by Isaac Marovitz
parent 3937b08ae7
commit 547be227a0
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1
5 changed files with 7 additions and 7 deletions

View file

@ -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;
}

View file

@ -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);
}

View file

@ -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.

View file

@ -21,7 +21,7 @@ namespace Ryujinx.Input.Assigner
_keyboardState = _keyboard.GetKeyboardStateSnapshot();
}
public bool HasAnyButtonPressed()
public bool IsAnyButtonPressed()
{
return GetPressedButton() is not null;
}

View file

@ -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;
}