From c20969ccecc09dc74792f3348c3061a2c5a3fa1a Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Fri, 31 May 2024 22:28:54 +1000 Subject: Add Hoppity rank in pv (#1191) Co-authored-by: jani270 <69345714+jani270@users.noreply.github.com> Co-authored-by: SeRaid <77941535+SeRaid743@users.noreply.github.com> Co-authored-by: Phoebe <77941535+catgirlseraid@users.noreply.github.com> Co-authored-by: nopo Co-authored-by: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> --- .../notenoughupdates/profileviewer/ExtraPage.java | 26 +++++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ExtraPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ExtraPage.java index 5f3a31f1..4ceea2e9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ExtraPage.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ExtraPage.java @@ -127,17 +127,6 @@ public class ExtraPage extends GuiProfileViewerPage { int guiTop = GuiProfileViewer.getGuiTop(); super.mouseClicked(mouseX, mouseY, mouseButton); - // Dimensions: X: guiLeft + xStart + xOffset * 3, Y: guiTop + yStartBottom + 77, Width: 80, Height: 12 - if (mouseX >= GuiProfileViewer.getGuiLeft() + 22 + 103 * 3 && - mouseX <= GuiProfileViewer.getGuiLeft() + 22 + 103 * 3 + 80 && - mouseY >= GuiProfileViewer.getGuiTop() + 105 + 77 && mouseY <= GuiProfileViewer.getGuiTop() + 105 + 77 + 12) { - getInstance().killDeathSearchTextField.mouseClicked(mouseX, mouseY, mouseButton); - getInstance().playerNameTextField.otherComponentClick(); - return true; - } - - getInstance().killDeathSearchTextField.otherComponentClick(); - int i = ProfileViewerUtils.onSlotToChangePage(mouseX, mouseY, guiLeft, guiTop); switch (i) { case 1: @@ -151,6 +140,21 @@ public class ExtraPage extends GuiProfileViewerPage { break; } + if (onHoppityPage) { + return hoppityPage.mouseClicked(mouseX, mouseY, mouseButton); + } + + // Dimensions: X: guiLeft + xStart + xOffset * 3, Y: guiTop + yStartBottom + 77, Width: 80, Height: 12 + if (mouseX >= GuiProfileViewer.getGuiLeft() + 22 + 103 * 3 && + mouseX <= GuiProfileViewer.getGuiLeft() + 22 + 103 * 3 + 80 && + mouseY >= GuiProfileViewer.getGuiTop() + 105 + 77 && mouseY <= GuiProfileViewer.getGuiTop() + 105 + 77 + 12) { + getInstance().killDeathSearchTextField.mouseClicked(mouseX, mouseY, mouseButton); + getInstance().playerNameTextField.otherComponentClick(); + return true; + } + + getInstance().killDeathSearchTextField.otherComponentClick(); + return false; } -- cgit