mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-26 14:38:34 +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) => {
|
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;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue