Search in sources :

Example 1 with ModuleInstaller

use of org.terasology.engine.module.ModuleInstaller in project Terasology by MovingBlocks.

the class SelectModulesScreen 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);
}
Also used : ModuleInstaller(org.terasology.engine.module.ModuleInstaller) List(java.util.List) ArrayList(java.util.ArrayList) UIList(org.terasology.rendering.nui.widgets.UIList) Module(org.terasology.module.Module)

Aggregations

ArrayList (java.util.ArrayList)1 List (java.util.List)1 ModuleInstaller (org.terasology.engine.module.ModuleInstaller)1 Module (org.terasology.module.Module)1 UIList (org.terasology.rendering.nui.widgets.UIList)1