From b17bac050b1bb7676317e9c17bdcc12151c8045e Mon Sep 17 00:00:00 2001 From: huanghongxun Date: Sat, 3 Sep 2022 22:28:58 +0800 Subject: [PATCH] fix(ui): not parsing xml. Closes #1678. --- .../java/org/jackhuang/hmcl/ui/GameCrashWindow.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/GameCrashWindow.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/GameCrashWindow.java index 280a4b015..bda8d7c89 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/GameCrashWindow.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/GameCrashWindow.java @@ -77,7 +77,7 @@ public class GameCrashWindow extends Stage { private final StringProperty arch = new SimpleStringProperty(Architecture.SYSTEM_ARCH.getDisplayName()); private final TextFlow reasonTextFlow = new TextFlow(new Text(i18n("game.crash.reason.unknown"))); private final BooleanProperty loading = new SimpleBooleanProperty(); - private final Label feedbackLabel = new Label(i18n("game.crash.feedback")); + private final TextFlow feedbackTextFlow = new TextFlow(); private final ManagedProcess managedProcess; private final DefaultGameRepository repository; @@ -104,6 +104,8 @@ public class GameCrashWindow extends Stage { this.view = new View(); + this.feedbackTextFlow.getChildren().addAll(FXUtils.parseSegment(i18n("game.crash.feedback"), Controllers::onHyperlinkAction)); + setScene(new Scene(view, 800, 480)); getScene().getStylesheets().addAll(config().getTheme().getStylesheets(config().getLauncherFontFamily())); setTitle(i18n("game.crash.title")); @@ -180,9 +182,9 @@ public class GameCrashWindow extends Stage { reasonTextFlow.getChildren().setAll(FXUtils.parseSegment(i18n("game.crash.reason.unknown"), Controllers::onHyperlinkAction)); } - feedbackLabel.setVisible(true); + feedbackTextFlow.setVisible(true); } else { - feedbackLabel.setVisible(false); + feedbackTextFlow.setVisible(false); reasonTextFlow.getChildren().setAll(segments); } } @@ -350,7 +352,7 @@ public class GameCrashWindow extends Stage { gameDirPane.setPadding(new Insets(8)); VBox.setVgrow(gameDirPane, Priority.ALWAYS); - gameDirPane.getChildren().setAll(gameDir, javaDir, new VBox(reasonTitle, reasonTextFlow, feedbackLabel)); + gameDirPane.getChildren().setAll(gameDir, javaDir, new VBox(reasonTitle, reasonTextFlow, feedbackTextFlow)); } HBox toolBar = new HBox();