mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-26 14:38:34 +01:00
only count an element as touched if no other gestures are active
This commit is contained in:
parent
d7f43617c6
commit
08188a1a8f
1 changed files with 2 additions and 1 deletions
|
@ -205,7 +205,8 @@ namespace MLEM.Ui {
|
||||||
if (held != null && held.CanBePressed)
|
if (held != null && held.CanBePressed)
|
||||||
this.System.OnElementSecondaryPressed?.Invoke(held);
|
this.System.OnElementSecondaryPressed?.Invoke(held);
|
||||||
} else {
|
} else {
|
||||||
var held = this.Input.TouchState.Select(l => this.GetElementUnderPos(l.Position)).FirstOrDefault();
|
// 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;
|
||||||
if (held != this.TouchedElement) {
|
if (held != this.TouchedElement) {
|
||||||
if (this.TouchedElement != null)
|
if (this.TouchedElement != null)
|
||||||
this.System.OnElementTouchExit?.Invoke(this.TouchedElement);
|
this.System.OnElementTouchExit?.Invoke(this.TouchedElement);
|
||||||
|
|
Loading…
Reference in a new issue