mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-16 07:16:27 -04:00
Reorder priority of mod info elements in list entry (#2159)
Gives emphasis to the name and version as reported by the mod, instead of emphasizing the filename.
This commit is contained in:
parent
d46efe8410
commit
95b85c13eb
@ -228,25 +228,31 @@ class ModListPageSkin extends SkinBase<ModListPage> {
|
|||||||
static class ModInfoObject extends RecursiveTreeObject<ModInfoObject> implements Comparable<ModInfoObject> {
|
static class ModInfoObject extends RecursiveTreeObject<ModInfoObject> implements Comparable<ModInfoObject> {
|
||||||
private final BooleanProperty active;
|
private final BooleanProperty active;
|
||||||
private final LocalModFile localModFile;
|
private final LocalModFile localModFile;
|
||||||
|
private final String title;
|
||||||
private final String message;
|
private final String message;
|
||||||
private final ModTranslations.Mod mod;
|
private final ModTranslations.Mod mod;
|
||||||
|
|
||||||
ModInfoObject(LocalModFile localModFile) {
|
ModInfoObject(LocalModFile localModFile) {
|
||||||
this.localModFile = localModFile;
|
this.localModFile = localModFile;
|
||||||
this.active = localModFile.activeProperty();
|
this.active = localModFile.activeProperty();
|
||||||
StringBuilder message = new StringBuilder(localModFile.getName());
|
|
||||||
|
StringBuilder title = new StringBuilder(localModFile.getName());
|
||||||
if (isNotBlank(localModFile.getVersion()))
|
if (isNotBlank(localModFile.getVersion()))
|
||||||
message.append(", ").append(i18n("archive.version")).append(": ").append(localModFile.getVersion());
|
title.append(" ").append(localModFile.getVersion());
|
||||||
|
this.title = title.toString();
|
||||||
|
|
||||||
|
StringBuilder message = new StringBuilder(localModFile.getFileName());
|
||||||
if (isNotBlank(localModFile.getGameVersion()))
|
if (isNotBlank(localModFile.getGameVersion()))
|
||||||
message.append(", ").append(i18n("archive.game_version")).append(": ").append(localModFile.getGameVersion());
|
message.append(", ").append(i18n("archive.game_version")).append(": ").append(localModFile.getGameVersion());
|
||||||
if (isNotBlank(localModFile.getAuthors()))
|
if (isNotBlank(localModFile.getAuthors()))
|
||||||
message.append(", ").append(i18n("archive.author")).append(": ").append(localModFile.getAuthors());
|
message.append(", ").append(i18n("archive.author")).append(": ").append(localModFile.getAuthors());
|
||||||
this.message = message.toString();
|
this.message = message.toString();
|
||||||
|
|
||||||
this.mod = ModTranslations.MOD.getModById(localModFile.getId());
|
this.mod = ModTranslations.MOD.getModById(localModFile.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
String getTitle() {
|
String getTitle() {
|
||||||
return localModFile.getFileName();
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
String getSubtitle() {
|
String getSubtitle() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user