1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 20:58:34 +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) => { element.GetGamepadNextElement = (dir, usualNext) => {
if (dir == Direction2.Up) { if (dir == Direction2.Up) {
var prev = element.GetOlderSibling(); var prev = element.GetOlderSibling();
if (prev != null) return prev ?? this;
return prev;
} else if (dir == Direction2.Down) { } else if (dir == Direction2.Down) {
var next = element.GetSiblings(e => e.GetOlderSibling() == element).FirstOrDefault(); return element.GetSiblings(e => e.GetOlderSibling() == element).FirstOrDefault();
if (next != null)
return next;
} }
return usualNext; return usualNext;
}; };