From 81da219ec5feae36607df405641589f17273a59f Mon Sep 17 00:00:00 2001 From: CiiLu <109708109+CiiLu@users.noreply.github.com> Date: Sat, 5 Sep 2026 21:17:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?<1>=20=E9=A9=AC=E8=B9=84=E7=A0=B4=E6=98=A5?= =?UTF-8?q?=E5=AF=92=20=E6=9C=9D=E9=9C=9E=E6=BB=A1=E7=AC=94=E7=AB=AF=20?= =?UTF-8?q?=E8=AF=97=E4=B8=AD=E4=BA=BA=E5=BD=92=E6=9D=A5=E6=AC=BE=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jackhuang/hmcl/ui/construct/DialogPane.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/DialogPane.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/DialogPane.java index 0a2e9228d87..607294b1f3a 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/DialogPane.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/DialogPane.java @@ -41,6 +41,9 @@ public class DialogPane extends JFXDialogLayout { private final JFXProgressBar progressBar = new JFXProgressBar(); public DialogPane() { + this(false); + } + public DialogPane(boolean cancelOnly) { Label titleLabel = new Label(); titleLabel.textProperty().bind(title); setHeading(titleLabel); @@ -63,7 +66,12 @@ public DialogPane() { cancelButton.getStyleClass().add("dialog-cancel"); onEscPressed(this, cancelButton::fire); - setActions(warningLabel, acceptPane, cancelButton); + if (cancelOnly) { + setActions(warningLabel, cancelButton); + } else { + setActions(warningLabel, acceptPane, cancelButton); + } + } protected JFXProgressBar getProgressBar() { From f4c7ccba15dbbbb7a4691759bbb763dae16f8762 Mon Sep 17 00:00:00 2001 From: CiiLu <109708109+CiiLu@users.noreply.github.com> Date: Sat, 5 Sep 2026 21:20:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?<2>=20=E5=B9=B3=E5=9C=B0=E9=A3=8E=E4=B9=8D?= =?UTF-8?q?=E8=B5=B7=20=E9=9F=B5=E8=84=9A=E9=83=BD=E5=90=B9=E4=B9=B1=20?= =?UTF-8?q?=E4=B8=A4=E6=B3=93=E7=A7=8B=E6=B0=B4=20=E4=B9=9F=E8=B5=B7?= =?UTF-8?q?=E6=B3=A2=E6=BE=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/jackhuang/hmcl/ui/construct/DialogPane.java | 7 ++++--- .../hmcl/ui/instances/GameInstanceIconDialog.java | 2 ++ HMCL/src/main/resources/assets/lang/I18N.properties | 1 + HMCL/src/main/resources/assets/lang/I18N_zh.properties | 1 + HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties | 1 + 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/DialogPane.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/DialogPane.java index 607294b1f3a..0891b39a33f 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/DialogPane.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/DialogPane.java @@ -43,7 +43,8 @@ public class DialogPane extends JFXDialogLayout { public DialogPane() { this(false); } - public DialogPane(boolean cancelOnly) { + + public DialogPane(boolean closeOnly) { Label titleLabel = new Label(); titleLabel.textProperty().bind(title); setHeading(titleLabel); @@ -61,12 +62,12 @@ public DialogPane(boolean cancelOnly) { acceptPane.getStyleClass().add("small-spinner-pane"); acceptPane.setContent(acceptButton); - cancelButton.setText(i18n("button.cancel")); + cancelButton.setText(closeOnly ? i18n("button.close") : i18n("button.cancel")); cancelButton.setOnAction(e -> onCancel()); cancelButton.getStyleClass().add("dialog-cancel"); onEscPressed(this, cancelButton::fire); - if (cancelOnly) { + if (closeOnly) { setActions(warningLabel, cancelButton); } else { setActions(warningLabel, acceptPane, cancelButton); diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/instances/GameInstanceIconDialog.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/instances/GameInstanceIconDialog.java index 77fda7e3d69..17d2228601d 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/instances/GameInstanceIconDialog.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/instances/GameInstanceIconDialog.java @@ -43,6 +43,8 @@ public class GameInstanceIconDialog extends DialogPane { private final GameSettings.@Nullable Instance setting; public GameInstanceIconDialog(HMCLGameInstance gameInstance, Runnable onFinish) { + super(true); + this.gameInstance = gameInstance; this.onFinish = onFinish; this.setting = gameInstance.getSettingsOrCreate(); diff --git a/HMCL/src/main/resources/assets/lang/I18N.properties b/HMCL/src/main/resources/assets/lang/I18N.properties index 672b254bb31..a54c28cc702 100644 --- a/HMCL/src/main/resources/assets/lang/I18N.properties +++ b/HMCL/src/main/resources/assets/lang/I18N.properties @@ -203,6 +203,7 @@ assets.index.malformed=Index files of downloaded assets are corrupted. You can r button.cancel=Cancel button.change_source=Change Download Source button.clear=Clear +button.close=Close button.copy=Copy button.copy_and_exit=Copy and Exit button.delete=Delete diff --git a/HMCL/src/main/resources/assets/lang/I18N_zh.properties b/HMCL/src/main/resources/assets/lang/I18N_zh.properties index 48e4524a3da..6012b2b88a3 100644 --- a/HMCL/src/main/resources/assets/lang/I18N_zh.properties +++ b/HMCL/src/main/resources/assets/lang/I18N_zh.properties @@ -201,6 +201,7 @@ assets.index.malformed=資源檔案的索引檔案損壞。你可以在相應實 button.cancel=取消 button.change_source=切換下載源 button.clear=清除 +button.close=關閉 button.copy=複製 button.copy_and_exit=複製並退出 button.delete=刪除 diff --git a/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties b/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties index cc1c47a2dc5..5e0a90e0da2 100644 --- a/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties +++ b/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties @@ -203,6 +203,7 @@ assets.index.malformed=资源文件的索引文件损坏。你可以在相应实 button.cancel=取消 button.change_source=切换下载源 button.clear=清除 +button.close=关闭 button.copy=复制 button.copy_and_exit=复制并退出 button.delete=删除