mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-26 06:28:35 +01:00
fixed the fix
This commit is contained in:
parent
6c866cec74
commit
ceaaaefb47
1 changed files with 2 additions and 5 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue