This commit is contained in:
huangyuhui
2018-03-04 23:33:08 +08:00
parent affe36a568
commit 58c3ed9254
2 changed files with 4 additions and 4 deletions

View File

@@ -136,7 +136,7 @@ public final class Launcher extends Application {
public static final File MINECRAFT_DIRECTORY = getWorkingDirectory("minecraft");
public static final File HMCL_DIRECTORY = getWorkingDirectory("hmcl");
public static final String VERSION = "2.9";
public static final String VERSION = "@HELLO_MINECRAFT_LAUNCHER_VERSION_FOR_GRADLE_REPLACING@";
public static final String NAME = "HMCL";
public static final String TITLE = NAME + " " + VERSION;
public static final ResourceBundle RESOURCE_BUNDLE = Settings.INSTANCE.getLocale().getResourceBundle();

View File

@@ -89,10 +89,10 @@ public final class VersionsPage extends StackPane implements WizardPage, Refresh
chkSnapshot.selectedProperty().addListener(listener);
chkOld.selectedProperty().addListener(listener);
list.getSelectionModel().selectedItemProperty().addListener((a, b, newValue) -> {
if (newValue == null)
list.setOnMouseClicked(e -> {
if (list.getSelectionModel().getSelectedIndex() < 0)
return;
controller.getSettings().put(libraryId, newValue.getRemoteVersion());
controller.getSettings().put(libraryId, list.getSelectionModel().getSelectedItem().getRemoteVersion());
callback.run();
});
refresh();