diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java | 35 | ||||
-rw-r--r-- | src/main/resources/assets/notenoughupdates/pv_crimson_isle_page.png | bin | 3370 -> 3752 bytes |
2 files changed, 29 insertions, 6 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java index f9d91935..87548f5e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java @@ -32,6 +32,7 @@ import org.lwjgl.opengl.GL11; import java.text.DateFormat; import java.text.SimpleDateFormat; +import java.util.ArrayList; import java.util.Calendar; import java.util.HashMap; import java.util.LinkedHashMap; @@ -129,7 +130,7 @@ public class CrimsonIslePage extends GuiProfileViewerPage { drawDojoStats(netherIslandPlayerData, guiLeft, guiTop); // Kuudra stats - drawKuudraStats(netherIslandPlayerData, guiLeft, guiTop); + drawKuudraStats(netherIslandPlayerData, guiLeft, guiTop, mouseX, mouseY); // Last matriarch attempt drawLastMatriarchAttempt(netherIslandPlayerData, guiLeft, guiTop); @@ -138,7 +139,7 @@ public class CrimsonIslePage extends GuiProfileViewerPage { drawFactionReputation(netherIslandPlayerData, guiLeft, guiTop); } - public void drawKuudraStats(JsonObject data, int guiLeft, int guiTop) { + public void drawKuudraStats(JsonObject data, int guiLeft, int guiTop, int mouseX, int mouseY) { Utils.drawStringCentered( EnumChatFormatting.RED + "Kuudra Stats", Minecraft.getMinecraft().fontRendererObj, @@ -161,26 +162,48 @@ public class CrimsonIslePage extends GuiProfileViewerPage { int completions = kuudraCompletedTiers.has(kuudraTiers[i]) ? kuudraCompletedTiers.get(kuudraTiers[i]).getAsInt() : 0; + // Get the highest wave for this tier of kuudra if they have completed a run + // since infernal kuudra was released + int highestWaveCompleted = kuudraCompletedTiers.has("highest_wave_" + kuudraTiers[i]) ? + kuudraCompletedTiers.get("highest_wave_" + kuudraTiers[i]).getAsInt() : 0; + Minecraft.getMinecraft().getRenderItem().renderItemIntoGUI( KUUDRA_KEYS[i], guiLeft + 8, - guiTop + 25 + (i * 12) + guiTop + 30 + (i * 30) ); Utils.renderAlignedString( EnumChatFormatting.RED + KUUDRA_TIERS[i] + ": ", EnumChatFormatting.WHITE + String.valueOf(completions), guiLeft + 23, - guiTop + 30 + (i * 12), + guiTop + 30 + (i * 30), + 110 + ); + + Utils.renderAlignedString( + EnumChatFormatting.RED + "Highest Wave: ", + EnumChatFormatting.WHITE + (highestWaveCompleted != 0 ? String.valueOf(highestWaveCompleted) : "N/A"), + guiLeft + 23, + guiTop + 42 + (i * 30), 110 ); + + if (highestWaveCompleted == 0) { + if (mouseX > guiLeft + 23 && mouseX < guiLeft + 133 && mouseY < guiTop + 50 + (i*30) && mouseY > guiTop + 42 + (i*30)) { + getInstance().tooltipToDisplay = new ArrayList<>(); + getInstance().tooltipToDisplay.add(EnumChatFormatting.RED + "N/A will only show for highest wave"); + getInstance().tooltipToDisplay.add(EnumChatFormatting.RED + "if you have not completed a run for"); + getInstance().tooltipToDisplay.add(EnumChatFormatting.RED + "this tier since Infernal tier was released."); + } + } } Utils.renderAlignedString( - EnumChatFormatting.RED + "Total: ", + EnumChatFormatting.RED + "Total runs: ", EnumChatFormatting.WHITE + String.valueOf(getTotalKuudraRuns(kuudraCompletedTiers)), guiLeft + 23, - guiTop + 40 + (5 * 12), + guiTop + 30 + (5 * 30), 110 ); } diff --git a/src/main/resources/assets/notenoughupdates/pv_crimson_isle_page.png b/src/main/resources/assets/notenoughupdates/pv_crimson_isle_page.png Binary files differindex b08c0057..7ea7af0e 100644 --- a/src/main/resources/assets/notenoughupdates/pv_crimson_isle_page.png +++ b/src/main/resources/assets/notenoughupdates/pv_crimson_isle_page.png |