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);
|
Thread.Sleep(10);
|
||||||
assigner.ReadInput();
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,9 +49,9 @@ namespace Ryujinx.Input.Assigner
|
||||||
CollectButtonStats();
|
CollectButtonStats();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool HasAnyButtonPressed()
|
public bool IsAnyButtonPressed()
|
||||||
{
|
{
|
||||||
return _detector.HasAnyButtonPressed();
|
return _detector.IsAnyButtonPressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ShouldCancel()
|
public bool ShouldCancel()
|
||||||
|
@ -123,7 +123,7 @@ namespace Ryujinx.Input.Assigner
|
||||||
_stats = new Dictionary<GamepadButtonInputId, InputSummary>();
|
_stats = new Dictionary<GamepadButtonInputId, InputSummary>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool HasAnyButtonPressed()
|
public bool IsAnyButtonPressed()
|
||||||
{
|
{
|
||||||
return _stats.Values.Any(CheckButtonPressed);
|
return _stats.Values.Any(CheckButtonPressed);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace Ryujinx.Input.Assigner
|
||||||
/// Check if a button was pressed.
|
/// Check if a button was pressed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>True if a button was pressed</returns>
|
/// <returns>True if a button was pressed</returns>
|
||||||
bool HasAnyButtonPressed();
|
bool IsAnyButtonPressed();
|
||||||
|
|
||||||
/// <summary>
|
/// <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.
|
/// 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();
|
_keyboardState = _keyboard.GetKeyboardStateSnapshot();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool HasAnyButtonPressed()
|
public bool IsAnyButtonPressed()
|
||||||
{
|
{
|
||||||
return GetPressedButton() is not null;
|
return GetPressedButton() is not null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||||
|
|
||||||
assigner.ReadInput();
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue