1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 20:58:34 +01:00

Revert "only count an element as touched if no other gestures are active"

This reverts commit 08188a1a
This commit is contained in:
Ellpeck 2020-06-03 16:18:17 +02:00
parent 08188a1a8f
commit f70b1266f9

View file

@ -205,8 +205,7 @@ namespace MLEM.Ui {
if (held != null && held.CanBePressed)
this.System.OnElementSecondaryPressed?.Invoke(held);
} else {
// only count an element as being touched if no other gestures are active right now
var held = !this.Input.Gestures.Any() ? this.Input.TouchState.Select(l => this.GetElementUnderPos(l.Position)).FirstOrDefault() : null;
var held = this.Input.TouchState.Select(l => this.GetElementUnderPos(l.Position)).FirstOrDefault();
if (held != this.TouchedElement) {
if (this.TouchedElement != null)
this.System.OnElementTouchExit?.Invoke(this.TouchedElement);