mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-25 22:18:34 +01:00
Fixed dropdowns with some non-selectable children failing to navigate when using gamepad controls
This commit is contained in:
parent
1f4f0cfa44
commit
c5b2b8798e
2 changed files with 3 additions and 2 deletions
|
@ -62,6 +62,7 @@ Fixes
|
|||
- Fixed buttons and checkboxes changing their CanBeSelected and CanBePressed values when being disabled
|
||||
- Fixed children of Panel scroll bars also being scrolled
|
||||
- Fixed RootElement.CanSelectContent and Element.IsSelected returning incorrect results when CanBeSelected changes
|
||||
- Fixed dropdowns with some non-selectable children failing to navigate when using gamepad controls
|
||||
|
||||
Removals
|
||||
- Marked StyleProp equality members as obsolete
|
||||
|
|
|
@ -63,10 +63,10 @@ namespace MLEM.Ui.Elements {
|
|||
if (dir == Direction2.Left || dir == Direction2.Right)
|
||||
return null;
|
||||
if (dir == Direction2.Up) {
|
||||
var prev = element.GetOlderSibling();
|
||||
var prev = element.GetOlderSibling(e => e.CanBeSelected);
|
||||
return prev ?? this;
|
||||
} else if (dir == Direction2.Down) {
|
||||
return element.GetSiblings(e => e.GetOlderSibling() == element).FirstOrDefault();
|
||||
return element.GetSiblings(e => e.CanBeSelected && e.GetOlderSibling(s => s.CanBeSelected) == element).FirstOrDefault();
|
||||
}
|
||||
return usualNext;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue