mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-17 07:47:57 -04:00
fix(crash): not displaying memory and java version.
This commit is contained in:
parent
9b24c683c3
commit
d89c8cc2d2
@ -91,6 +91,10 @@ public class GameCrashWindow extends Stage {
|
|||||||
this.launchOptions = launchOptions;
|
this.launchOptions = launchOptions;
|
||||||
this.logs = logs;
|
this.logs = logs;
|
||||||
this.analyzer = LibraryAnalyzer.analyze(version);
|
this.analyzer = LibraryAnalyzer.analyze(version);
|
||||||
|
|
||||||
|
memory = Optional.ofNullable(launchOptions.getMaxMemory()).map(i -> i + " MB").orElse("-");
|
||||||
|
java = launchOptions.getJava().getVersion();
|
||||||
|
|
||||||
this.view = new View();
|
this.view = new View();
|
||||||
|
|
||||||
setScene(new Scene(view, 800, 480));
|
setScene(new Scene(view, 800, 480));
|
||||||
@ -98,10 +102,6 @@ public class GameCrashWindow extends Stage {
|
|||||||
setTitle(i18n("game.crash.title"));
|
setTitle(i18n("game.crash.title"));
|
||||||
getIcons().add(newImage("/assets/img/icon.png"));
|
getIcons().add(newImage("/assets/img/icon.png"));
|
||||||
|
|
||||||
memory = Optional.ofNullable(launchOptions.getMaxMemory()).map(i -> i + " MB").orElse("-");
|
|
||||||
java = launchOptions.getJava().getVersion();
|
|
||||||
|
|
||||||
|
|
||||||
analyzeCrashReport();
|
analyzeCrashReport();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,8 +258,11 @@ public class GameCrashWindow extends Stage {
|
|||||||
titlePane.getChildren().setAll(title);
|
titlePane.getChildren().setAll(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
HBox infoPane = new HBox();
|
HBox infoPane = new HBox(8);
|
||||||
{
|
{
|
||||||
|
infoPane.setPadding(new Insets(8));
|
||||||
|
infoPane.setAlignment(Pos.CENTER_LEFT);
|
||||||
|
|
||||||
TwoLineListItem version = new TwoLineListItem();
|
TwoLineListItem version = new TwoLineListItem();
|
||||||
version.getStyleClass().setAll("two-line-item-second-large");
|
version.getStyleClass().setAll("two-line-item-second-large");
|
||||||
version.setTitle(i18n("archive.game_version"));
|
version.setTitle(i18n("archive.game_version"));
|
||||||
@ -285,12 +288,14 @@ public class GameCrashWindow extends Stage {
|
|||||||
arch.setTitle(i18n("system.architecture"));
|
arch.setTitle(i18n("system.architecture"));
|
||||||
arch.subtitleProperty().bind(GameCrashWindow.this.arch);
|
arch.subtitleProperty().bind(GameCrashWindow.this.arch);
|
||||||
|
|
||||||
infoPane.setPadding(new Insets(8));
|
|
||||||
infoPane.getChildren().setAll(version, memory, java, os, arch);
|
infoPane.getChildren().setAll(version, memory, java, os, arch);
|
||||||
}
|
}
|
||||||
|
|
||||||
HBox moddedPane = new HBox();
|
HBox moddedPane = new HBox(8);
|
||||||
{
|
{
|
||||||
|
moddedPane.setPadding(new Insets(8));
|
||||||
|
moddedPane.setAlignment(Pos.CENTER_LEFT);
|
||||||
|
|
||||||
for (LibraryAnalyzer.LibraryType type : LibraryAnalyzer.LibraryType.values()) {
|
for (LibraryAnalyzer.LibraryType type : LibraryAnalyzer.LibraryType.values()) {
|
||||||
analyzer.getVersion(type).ifPresent(ver -> {
|
analyzer.getVersion(type).ifPresent(ver -> {
|
||||||
TwoLineListItem item = new TwoLineListItem();
|
TwoLineListItem item = new TwoLineListItem();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user