Search in sources :

Example 6 with MessagePopup

use of org.terasology.engine.rendering.nui.layers.mainMenu.MessagePopup in project Terasology by MovingBlocks.

the class GameDetailsScreen method onOpened.

@Override
public void onOpened() {
    super.onOpened();
    if (isScreenValid()) {
        errors = new ArrayList<>();
        loadGeneralInfo();
        loadGameModules();
        loadBlocks();
        loadGameWorlds();
        if (!errors.isEmpty()) {
            showErrors();
        }
        tabs.select(0);
        showErrors.setEnabled(!errors.isEmpty());
    } else {
        final MessagePopup popup = getManager().createScreen(MessagePopup.ASSET_URI, MessagePopup.class);
        popup.setMessage(translationSystem.translate("${engine:menu#game-details-errors-message-title}"), translationSystem.translate("${engine:menu#game-details-errors-message-body}"));
        popup.subscribeButton(e -> triggerBackAnimation());
        getManager().pushScreen(popup);
        // disable child widgets
        setEnabled(false);
    }
}
Also used : MessagePopup(org.terasology.engine.rendering.nui.layers.mainMenu.MessagePopup)

Aggregations

MessagePopup (org.terasology.engine.rendering.nui.layers.mainMenu.MessagePopup)6 DependencyResolutionFailedException (org.terasology.engine.core.module.DependencyResolutionFailedException)2 ConfirmPopup (org.terasology.engine.rendering.nui.layers.mainMenu.ConfirmPopup)2 Module (org.terasology.gestalt.module.Module)2 StateLoading (org.terasology.engine.core.modes.StateLoading)1 RegisterInputSystem (org.terasology.engine.core.modes.loadProcesses.RegisterInputSystem)1 TranslationSystem (org.terasology.engine.i18n.TranslationSystem)1 StorageServiceWorker (org.terasology.engine.identity.storageServiceClient.StorageServiceWorker)1 InputSystem (org.terasology.engine.input.InputSystem)1 Console (org.terasology.engine.logic.console.Console)1 ConsoleCommand (org.terasology.engine.logic.console.commandSystem.ConsoleCommand)1 Command (org.terasology.engine.logic.console.commandSystem.annotations.Command)1 JoinStatus (org.terasology.engine.network.JoinStatus)1 NUIManager (org.terasology.engine.rendering.nui.NUIManager)1 NUIEditorSystem (org.terasology.engine.rendering.nui.editor.systems.NUIEditorSystem)1 NUISkinEditorSystem (org.terasology.engine.rendering.nui.editor.systems.NUISkinEditorSystem)1