Skip to content

Commit

Permalink
Add newlines between credit groups, allow translating role names
Browse files Browse the repository at this point in the history
  • Loading branch information
LostLuma committed Apr 18, 2024
1 parent 45812e3 commit 8b1937a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,13 @@ public void renderList(DrawContext DrawContext, int mouseX, int mouseY, float de

while (iterator.hasNext()) {
int indent = 8;

var role = iterator.next();
var rolename = role.getKey();

var name = Text.translatableWithFallback("modmenu.credits.role." + rolename.toLowerCase(), rolename);

for (var line : textRenderer.wrapLines(Text.literal(role.getKey() + ":"), wrapWidth - 16)) {
for (var line : textRenderer.wrapLines(name.append(Text.literal(":")), wrapWidth - 16)) {
children().add(new DescriptionEntry(line, indent));
indent = 16;
}
Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/assets/modmenu/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@
"modmenu.wiki": "Wiki",
"modmenu.youtube": "YouTube",

"modmenu.credits.role.author": "Authors",
"modmenu.credits.role.contributor": "Contributors",
"modmenu.credits.role.translator": "Translators",
"modmenu.credits.role.maintainer": "Maintainers",
"modmenu.credits.role.playtester": "Playtesters",
"modmenu.credits.role.illustrator": "Illustrators",

"modmenu.modsFolder": "Open Mods Folder",
"modmenu.configsFolder": "Open Configs Folder",

Expand Down

0 comments on commit 8b1937a

Please sign in to comment.