Automatic migration. Original reporter: "Xirnohn"
My approach: New Property for Window: TabOrder. Its and int, if its 0, than its not selectable with tab/shift+tab.
WinA - 2
|-WinB - 1|
|-WinC - 5|
|-WinD - 15|
|-WinE - 10|
If the active window is WinA, then the order are when we press tab(st least 4 times): WinC, WinE, WinD. Now the WindD the active window, pressing Shift+Tab the order are: WinE, WinC, WinA, WinB.
In System::injectKeyDown intercept the Tab and Shift+Tab when Tab pressed: get the next higer TabOrdered window's TabOrder value, then activate it: int tabOrder = 0;
get the current TabOrder value if (d_activeSheet->getActiveChild() != NULL) tabOrder = d_activeSheet->getActiveChild()->getTabOrder(); else tabOrder = d_activeSheet->getTabOrder();
get the next bigger TabOrder value what is present int newTab = d_activeSheet->getNextTabOrder(tabOrder);
if the selections returns true, then new window selected, the Tab key handled, we return from the injectKeyDown if (d_activeSheet->selectNextWindowWithTab(newTab)) return true;
Same with Shift+Tab.
Its can be integrated to the LayoutEditor and i think its better then create a new class to handle this functionality like the TabNavigation class in the wiki: http://www.cegui.org.uk/wiki/index.php/Tab_Order