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

get lowest elements towards the end of the list

This commit is contained in:
Ellpeck 2019-11-05 22:08:19 +01:00
parent 6340f75acc
commit 061f8279d7

View file

@ -348,7 +348,7 @@ namespace MLEM.Ui.Elements {
continue; continue;
if (child.Anchor > Anchor.TopRight && child.Anchor < Anchor.AutoLeft) if (child.Anchor > Anchor.TopRight && child.Anchor < Anchor.AutoLeft)
continue; continue;
if (lowest == null || child.UnscrolledArea.Bottom > lowest.UnscrolledArea.Bottom) if (lowest == null || child.UnscrolledArea.Bottom >= lowest.UnscrolledArea.Bottom)
lowest = child; lowest = child;
} }
return lowest; return lowest;
@ -361,7 +361,7 @@ namespace MLEM.Ui.Elements {
continue; continue;
if (child.Anchor < Anchor.BottomRight && child.Anchor != Anchor.TopRight && child.Anchor != Anchor.CenterRight) if (child.Anchor < Anchor.BottomRight && child.Anchor != Anchor.TopRight && child.Anchor != Anchor.CenterRight)
continue; continue;
if (rightmost == null || child.UnscrolledArea.Right > rightmost.UnscrolledArea.Right) if (rightmost == null || child.UnscrolledArea.Right >= rightmost.UnscrolledArea.Right)
rightmost = child; rightmost = child;
} }
return rightmost; return rightmost;
@ -376,7 +376,7 @@ namespace MLEM.Ui.Elements {
break; break;
if (condition != null && !condition(child)) if (condition != null && !condition(child))
continue; continue;
if (lowest == null || child.UnscrolledArea.Bottom > lowest.UnscrolledArea.Bottom) if (lowest == null || child.UnscrolledArea.Bottom >= lowest.UnscrolledArea.Bottom)
lowest = child; lowest = child;
} }
return lowest; return lowest;