use of org.terasology.engine.core.module.ModuleInstaller in project Terasology by MovingBlocks.
the class ModuleDetailsScreen method downloadModules.
private void downloadModules(Iterable<Module> modulesToDownload) {
final WaitPopup<List<Module>> popup = getManager().pushScreen(WaitPopup.ASSET_URI, WaitPopup.class);
ModuleInstaller operation = moduleManager.getInstallManager().createInstaller(modulesToDownload, new DownloadPopupProgressListener(popup));
popup.startOperation(operation, true);
}
use of org.terasology.engine.core.module.ModuleInstaller in project Terasology by MovingBlocks.
the class AdvancedGameSetupScreen method downloadModules.
private void downloadModules(Iterable<Module> modulesToDownload) {
final WaitPopup<List<Module>> popup = getManager().pushScreen(WaitPopup.ASSET_URI, WaitPopup.class);
popup.onSuccess(newModules -> {
for (Module module : newModules) {
modulesLookup.get(module.getId()).setLocalVersion(module);
updateValidToSelect();
}
});
ModuleInstaller operation = moduleManager.getInstallManager().createInstaller(modulesToDownload, new DownloadPopupProgressListener(popup));
popup.startOperation(operation, true);
}
Aggregations