Fix IGUIElements not getting a tab order because of invisible or disabled parents.

First problem was that IGUIElement::getNextElement wasn't passing includeInvisible and includeDisabled flags recursively, so anything deeper than one level could fail if an element was disabled/invisible in between while it was created.
Second problem was that setTabOrder(-1) did ignore disabled elements. So when any parent was disabled when elements were created they never got a tab order.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6428 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien 2022-09-27 16:02:39 +00:00 committed by sfan5
parent a7f9afd289
commit 3cf75cdce4

@ -433,7 +433,7 @@ public:
if (el) if (el)
{ {
// find the highest element number // find the highest element number
el->getNextElement(-1, true, IsTabGroup, first, closest, true); el->getNextElement(-1, true, IsTabGroup, first, closest, true, true);
if (first) if (first)
{ {
TabOrder = first->getTabOrder() + 1; TabOrder = first->getTabOrder() + 1;
@ -706,7 +706,7 @@ public:
} }
} }
// search within children // search within children
if ((*it)->getNextElement(startOrder, reverse, group, first, closest)) if ((*it)->getNextElement(startOrder, reverse, group, first, closest, includeInvisible, includeDisabled))
{ {
return true; return true;
} }