use of org.terasology.nui.WidgetWithOrder in project Terasology by MovingBlocks.
the class CoreScreenLayer method iterateThrough.
private void iterateThrough(Iterator<UIWidget> widgets) {
modifyingList = true;
while (widgets.hasNext()) {
UIWidget next = widgets.next();
boolean setParent = false;
if (next instanceof ScrollableArea) {
parentToSet = (ScrollableArea) next;
}
if (next instanceof WidgetWithOrder) {
TabbingManager.addToWidgetsList((WidgetWithOrder) next);
TabbingManager.addToUsedNums(((WidgetWithOrder) next).getOrder());
((WidgetWithOrder) next).setParent(parentToSet);
}
if (next.iterator().hasNext()) {
iterateThrough(next.iterator());
} else if (next instanceof UIRadialRing) {
Iterator<UIRadialSection> iter = ((UIRadialRing) next).getSections().iterator();
while (iter.hasNext()) {
next = iter.next();
TabbingManager.addToWidgetsList((WidgetWithOrder) next);
TabbingManager.addToUsedNums(((WidgetWithOrder) next).getOrder());
if (setParent) {
((WidgetWithOrder) next).setParent(parentToSet);
}
}
}
}
modifyingList = false;
}
Aggregations