aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyeyoung <cyoung06@naver.com>2021-10-04 14:16:35 +0900
committersyeyoung <cyoung06@naver.com>2021-10-04 14:16:35 +0900
commit7b0fb77d77bf533dbfc047919d3c593dcf6fbc41 (patch)
treecb437f78876a7ac47a9658446965923627e7e30f
parenta98c778b6e3398f265eeb56e1984c28aadb153bd (diff)
downloadSkyblock-Dungeons-Guide-7b0fb77d77bf533dbfc047919d3c593dcf6fbc41.tar.gz
Skyblock-Dungeons-Guide-7b0fb77d77bf533dbfc047919d3c593dcf6fbc41.tar.bz2
Skyblock-Dungeons-Guide-7b0fb77d77bf533dbfc047919d3c593dcf6fbc41.zip
- Minimum Partyfinder size
- Fix player heads in custom party finder rendering weird - FIX: Bug report 67 (popup menu closes after clicking on it)
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/GuiCustomPartyFinder.java8
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyListElement.java1
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPopupMenu.java2
3 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/GuiCustomPartyFinder.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/GuiCustomPartyFinder.java
index bac1db98..98b733e5 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/GuiCustomPartyFinder.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/GuiCustomPartyFinder.java
@@ -25,6 +25,7 @@ import lombok.Setter;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.inventory.GuiChest;
+import net.minecraft.util.MathHelper;
import java.awt.*;
@@ -53,7 +54,12 @@ public class GuiCustomPartyFinder extends MGui {
@Override
public void initGui() {
super.initGui();
- panelPartyFinder.setBounds(new Rectangle(Minecraft.getMinecraft().displayWidth/5, Minecraft.getMinecraft().displayHeight/5,3*Minecraft.getMinecraft().displayWidth/5, 3*Minecraft.getMinecraft().displayHeight/5));
+ int width = 3*Minecraft.getMinecraft().displayWidth/5;
+ width = Math.max(width, 1000);
+ int height = 3*Minecraft.getMinecraft().displayHeight/5;
+ height = Math.max(height, 600);
+
+ panelPartyFinder.setBounds(new Rectangle((Minecraft.getMinecraft().displayWidth-width)/2, (Minecraft.getMinecraft().displayHeight-height)/2, width, height));
}
@Override
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyListElement.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyListElement.java
index ba38c15e..9b8ff119 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyListElement.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyListElement.java
@@ -123,6 +123,7 @@ public class PanelPartyListElement extends MPanel {
RenderHelper.enableGUIStandardItemLighting();
GlStateManager.scale(2,2,1);
GlStateManager.enableCull();
+ GlStateManager.enableDepth();
renderItem.renderItemAndEffectIntoGUI(itemStack, 0,0);
GlStateManager.popMatrix();
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPopupMenu.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPopupMenu.java
index 4bec72ed..6db97d51 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPopupMenu.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPopupMenu.java
@@ -96,7 +96,7 @@ public class MPopupMenu extends MTooltip {
@Override
public void mouseClicked(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int mouseButton) {
- if (!getBounds().contains(absMouseX, absMouseY)) {
+ if (!lastAbsClip.contains(absMouseX, absMouseY)) {
close();
}
}