diff --git a/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/StatsDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/StatsDialog.java index 48a688d86..031c9c4b7 100644 --- a/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/StatsDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/StatsDialog.java @@ -42,7 +42,10 @@ public static void show(Gui gui, ProjectStatsResult result, String packageName) Map checkboxes = new EnumMap<>(StatType.class); - final int[] i = {0}; + String overallText = I18n.translate("menu.file.stats.overall") + " - " + String.format("%.2f%%", result.getPercentage(StatType.values())); + contentPane.add(new JLabel(overallText), GridBagConstraintsBuilder.create().width(20).anchor(GridBagConstraints.CENTER).build()); + + final int[] i = {1}; result.getOverall().getTypes().stream().sorted(Comparator.comparing(StatType::getName)).forEach(type -> { JCheckBox checkBox = new JCheckBox(type.getName()); checkboxes.put(type, checkBox); diff --git a/enigma/src/main/resources/lang/en_us.json b/enigma/src/main/resources/lang/en_us.json index 9399f3bcc..a67e75c55 100644 --- a/enigma/src/main/resources/lang/en_us.json +++ b/enigma/src/main/resources/lang/en_us.json @@ -34,6 +34,7 @@ "menu.file.export.jar": "Export Jar...", "menu.file.stats": "Mapping Stats...", "menu.file.stats.title": "Mapping Stats", + "menu.file.stats.overall": "Overall", "menu.file.stats.title_filtered": "Mapping Stats for %s", "menu.file.stats.filter": "Filter", "menu.file.stats.top_level_package": "Top-Level Package:",