Examples of TerasologyGameVersion


Examples of org.terasology.launcher.game.TerasologyGameVersion

        }
    }

    @FXML
    protected void startGameAction() {
        final TerasologyGameVersion gameVersion = getSelectedGameVersion();
        if ((gameVersion == null) || !gameVersion.isInstalled()) {
            logger.warn("The selected game version can not be started! '{}'", gameVersion);
            JOptionPane.showMessageDialog(null, BundleUtils.getLabel("message_error_gameStart"),
                    BundleUtils.getLabel("message_error_title"), JOptionPane.ERROR_MESSAGE);
            // updateGui();
        } else if (gameStarter.isRunning()) {
View Full Code Here

Examples of org.terasology.launcher.game.TerasologyGameVersion

        }
    }

    @FXML
    protected void downloadAction() {
        final TerasologyGameVersion gameVersion = getSelectedGameVersion();
        if (gameDownloadWorker != null) {
            // Cancel download
            logger.info("Cancel game download!");
            gameDownloadWorker.cancel(false);
        } else if ((gameVersion == null) || gameVersion.isInstalled() || (gameVersion.getSuccessful() == null) || !gameVersion.getSuccessful()) {
            logger.warn("The selected game version can not be downloaded! '{}'", gameVersion);
        } else {
            try {
                GameDownloader gameDownloader = new GameDownloader(downloadDirectory, tempDirectory, launcherSettings.isSaveDownloadedFiles(),
                    launcherSettings.getGameDirectory(), gameVersion, gameVersions);
View Full Code Here

Examples of org.terasology.launcher.game.TerasologyGameVersion

        updateGui();
    }

    @FXML
    protected void deleteAction() {
        final TerasologyGameVersion gameVersion = getSelectedGameVersion();
        if ((gameVersion != null) && gameVersion.isInstalled()) {
            final boolean containsGameData = DirectoryUtils.containsGameData(gameVersion.getInstallationPath());
            final String msg;
            if (containsGameData) {
                msg = BundleUtils.getMessage("confirmDeleteGame_withData", gameVersion.getInstallationPath());
            } else {
                msg = BundleUtils.getMessage("confirmDeleteGame_withoutData", gameVersion.getInstallationPath());
            }
            final int option = JOptionPane.showConfirmDialog(null, msg, BundleUtils.getLabel("message_deleteGame_title"), JOptionPane.YES_NO_OPTION);
            if (option == JOptionPane.YES_OPTION) {
                logger.info("Delete installed game! '{}' '{}'", gameVersion, gameVersion.getInstallationPath());
                try {
                    FileUtils.delete(gameVersion.getInstallationPath());
                } catch (IOException e) {
                    logger.error("Could not delete installed game!", e);
                    // TODO Show message dialog
                    return;
                }
View Full Code Here

Examples of org.terasology.launcher.game.TerasologyGameVersion

            versionInfo.setText(launcherVersion);
        }
    }

    private void updateButtons() {
        final TerasologyGameVersion gameVersion = getSelectedGameVersion();
        if (gameVersion == null) {
            downloadButton.setDisable(true);
            startButton.setDisable(true);
            deleteButton.setDisable(true);
        } else if (gameVersion.isInstalled()) {
            downloadButton.setDisable(true);
            startButton.setDisable(false);
            deleteButton.setDisable(false);
        } else if ((gameVersion.getSuccessful() != null) && gameVersion.getSuccessful() && (gameVersion.getBuildNumber() != null) && (gameDownloadWorker == null)) {
            downloadButton.setDisable(false);
            startButton.setDisable(true);
            deleteButton.setDisable(true);
        } else {
            downloadButton.setDisable(true);
View Full Code Here

Examples of org.terasology.launcher.game.TerasologyGameVersion

            }
        }
    }

    private void updateChangeLog() {
        final TerasologyGameVersion gameVersion = getSelectedGameVersion();
        final String gameInfoTextHTML;
        if ((gameVersion == null) || (gameVersion.getJob() == null) || (gameVersion.getBuildNumber() == null)) {
            gameInfoTextHTML = "";
        } else {
            gameInfoTextHTML = getGameInfoText(gameVersion);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.