use of org.terasology.engine.config.flexible.AutoConfig in project Terasology by MovingBlocks.
the class AutoConfigScreen method initialise.
@Override
public void initialise() {
mainContainer = find("mainContainer", ColumnLayout.class);
assert mainContainer != null;
for (AutoConfig config : configManager.getLoadedConfigs()) {
Binding<AutoConfig> configBinding = new DefaultBinding<>(config);
Optional<UIWidget> widget = typeWidgetLibrary.getWidget(configBinding, AutoConfig.class);
if (widget.isPresent()) {
mainContainer.addWidget(widget.get());
} else {
logger.warn("Cannot create widget for config: {}", config.getId());
}
}
WidgetUtil.trySubscribe(this, "close", button -> triggerBackAnimation());
}
Aggregations