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

fixed panel element detection being incorrect if scrolling overflow is enabled

This commit is contained in:
Ell 2020-11-05 01:16:01 +01:00
parent bb596c91ff
commit f6c4d83775

View file

@ -178,7 +178,7 @@ namespace MLEM.Ui.Elements {
public override Element GetElementUnderPos(Vector2 position) {
// if overflow is handled, don't propagate mouse checks to hidden children
if (this.scrollOverflow && !this.GetRenderTargetArea().Contains(position))
return null;
return !this.IsHidden && this.CanBeMoused && this.DisplayArea.Contains(position) ? this : null;
return base.GetElementUnderPos(position);
}