mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-08-04 03:46:57 -04:00
parent
82dbe18d78
commit
e7e8d45497
@ -195,9 +195,10 @@ public final class VersionSettingsPage extends StackPane implements DecoratorPag
|
|||||||
copyGlobalPane.setLeft(label);
|
copyGlobalPane.setLeft(label);
|
||||||
BorderPane.setAlignment(label, Pos.CENTER_LEFT);
|
BorderPane.setAlignment(label, Pos.CENTER_LEFT);
|
||||||
|
|
||||||
JFXButton button = new JFXButton(i18n("settings.game.copy_global.copy_all"));
|
JFXButton copyAll = new JFXButton(i18n("settings.game.copy_global.copy_all"));
|
||||||
copyGlobalPane.setRight(button);
|
copyAll.disableProperty().bind(modpack);
|
||||||
button.setOnAction(e -> Controllers.confirm(i18n("settings.game.copy_global.copy_all.confirm"), null, () -> {
|
copyGlobalPane.setRight(copyAll);
|
||||||
|
copyAll.setOnAction(e -> Controllers.confirm(i18n("settings.game.copy_global.copy_all.confirm"), null, () -> {
|
||||||
Set<String> ignored = new HashSet<>(Arrays.asList(
|
Set<String> ignored = new HashSet<>(Arrays.asList(
|
||||||
"usesGlobal",
|
"usesGlobal",
|
||||||
"versionIcon"
|
"versionIcon"
|
||||||
@ -205,8 +206,8 @@ public final class VersionSettingsPage extends StackPane implements DecoratorPag
|
|||||||
|
|
||||||
PropertyUtils.copyProperties(profile.getGlobal(), lastVersionSetting, name -> !ignored.contains(name));
|
PropertyUtils.copyProperties(profile.getGlobal(), lastVersionSetting, name -> !ignored.contains(name));
|
||||||
}, null));
|
}, null));
|
||||||
button.getStyleClass().add("jfx-button-border");
|
copyAll.getStyleClass().add("jfx-button-border");
|
||||||
BorderPane.setAlignment(button, Pos.CENTER_RIGHT);
|
BorderPane.setAlignment(copyAll, Pos.CENTER_RIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentList.getContent().add(copyGlobalPane);
|
componentList.getContent().add(copyGlobalPane);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user