mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-25 05:58:35 +01:00
Fixed InputHandler touch states being initialized incorrectly when touch handling is disabled
Closes #10
This commit is contained in:
parent
764b29e120
commit
e191d4919b
2 changed files with 4 additions and 2 deletions
|
@ -28,6 +28,7 @@ Improvements
|
|||
|
||||
Fixes
|
||||
- Fixed TextInput not working correctly when using surrogate pairs
|
||||
- Fixed InputHandler touch states being initialized incorrectly when touch handling is disabled
|
||||
|
||||
### MLEM.Ui
|
||||
Additions
|
||||
|
|
|
@ -121,11 +121,11 @@ namespace MLEM.Input {
|
|||
/// <summary>
|
||||
/// Contains the <see cref="LastTouchState"/>, but with the <see cref="GraphicsDevice.Viewport"/> taken into account.
|
||||
/// </summary>
|
||||
public IList<TouchLocation> LastViewportTouchState { get; private set; }
|
||||
public IList<TouchLocation> LastViewportTouchState { get; private set; } = new List<TouchLocation>();
|
||||
/// <summary>
|
||||
/// Contains the <see cref="TouchState"/>, but with the <see cref="GraphicsDevice.Viewport"/> taken into account.
|
||||
/// </summary>
|
||||
public IList<TouchLocation> ViewportTouchState { get; private set; }
|
||||
public IList<TouchLocation> ViewportTouchState { get; private set; } = new List<TouchLocation>();
|
||||
/// <summary>
|
||||
/// Contains the amount of gamepads that are currently connected. Note that this value will be set to 0 if <see cref="HandleGamepads"/> is false.
|
||||
/// This field is automatically updated in <see cref="Update()"/>.
|
||||
|
@ -342,6 +342,7 @@ namespace MLEM.Input {
|
|||
}
|
||||
} else {
|
||||
this.TouchState = new TouchCollection(InputHandler.EmptyTouchLocations);
|
||||
this.ViewportTouchState = this.TouchState;
|
||||
this.gestures.Clear();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue