1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-12-25 17:59:24 +01:00

fixed the fix

This commit is contained in:
Ellpeck 2020-03-16 19:22:08 +01:00
parent 6c866cec74
commit ceaaaefb47

View file

@ -31,12 +31,9 @@ namespace MLEM.Ui.Elements {
element.GetGamepadNextElement = (dir, usualNext) => {
if (dir == Direction2.Up) {
var prev = element.GetOlderSibling();
if (prev != null)
return prev;
return prev ?? this;
} else if (dir == Direction2.Down) {
var next = element.GetSiblings(e => e.GetOlderSibling() == element).FirstOrDefault();
if (next != null)
return next;
return element.GetSiblings(e => e.GetOlderSibling() == element).FirstOrDefault();
}
return usualNext;
};