diff options
author | syeyoung <cyong06@naver.com> | 2021-03-10 23:06:05 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-03-10 23:06:05 +0900 |
commit | 92ce9024b73df31f3c88ad23a7443dec2578469c (patch) | |
tree | dd7f6c928c79e2847a34ccb47820a037d244e361 /src/main/java/kr/syeyoung/dungeonsguide/party | |
parent | a7030786cc5f3b756f8b538f8f071cd7d5c14e77 (diff) | |
download | Skyblock-Dungeons-Guide-92ce9024b73df31f3c88ad23a7443dec2578469c.tar.gz Skyblock-Dungeons-Guide-92ce9024b73df31f3c88ad23a7443dec2578469c.tar.bz2 Skyblock-Dungeons-Guide-92ce9024b73df31f3c88ad23a7443dec2578469c.zip |
finally fix gui flashing issue.
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/party')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java index 845b7308..79c1faa9 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java @@ -7,6 +7,7 @@ import kr.syeyoung.dungeonsguide.features.AbstractFeature; import kr.syeyoung.dungeonsguide.features.FeatureRegistry; import kr.syeyoung.dungeonsguide.features.GuiFeature; import kr.syeyoung.dungeonsguide.features.listener.ScreenRenderListener; +import kr.syeyoung.dungeonsguide.utils.RenderUtils; import kr.syeyoung.dungeonsguide.utils.TextUtils; import net.arikia.dev.drpc.DiscordRPC; import net.minecraft.client.Minecraft; @@ -162,6 +163,7 @@ public class PartyInviteViewer { y += height + gap; } GlStateManager.popMatrix(); + GlStateManager.enableBlend(); } catch (Throwable t) { t.printStackTrace(); } @@ -180,8 +182,8 @@ public class PartyInviteViewer { GlStateManager.pushMatrix(); GlStateManager.translate(x,y,0); - Gui.drawRect(0, 0,width,height, 0xFF23272a); - Gui.drawRect(2, 2, width-2, height-2, 0XFF2c2f33); + RenderUtils.drawRectSafe(0, 0,width,height, 0xFF23272a); + RenderUtils.drawRectSafe(2, 2, width-2, height-2, 0XFF2c2f33); { String avatar = "https://cdn.discordapp.com/avatars/"+partyJoinRequest.getDiscordUser().userId+"/"+partyJoinRequest.getDiscordUser().avatar+".png"; Future<LoadedImage> loadedImageFuture = loadImage(avatar); @@ -212,7 +214,7 @@ public class PartyInviteViewer { GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit); GlStateManager.popAttrib(); } else { - Gui.drawRect(7, 7, height - 7, height-7, 0xFF4E4E4E); + RenderUtils.drawRectSafe(7, 7, height - 7, height-7, 0xFF4E4E4E); } } @@ -242,7 +244,7 @@ public class PartyInviteViewer { GlStateManager.pushMatrix(); String text = "Accept"; partyJoinRequest.getAcceptRect().setBounds(x + height + 3, y + height - 25, widthForTheThing - 10, 25); - Gui.drawRect(0, 0, widthForTheThing - 10, 25, hover && partyJoinRequest.getAcceptRect().contains(mouseX, mouseY) ? 0xFF859DF0 : 0xFF7289da); + RenderUtils.drawRectSafe(0, 0, widthForTheThing - 10, 25, hover && partyJoinRequest.getAcceptRect().contains(mouseX, mouseY) ? 0xFF859DF0 : 0xFF7289da); GlStateManager.translate((widthForTheThing - 10 - fr.getStringWidth(text) * 2) / 2, 15 - fr.FONT_HEIGHT, 0); GlStateManager.scale(2.0f, 2.0f, 1.0f); @@ -250,7 +252,7 @@ public class PartyInviteViewer { GlStateManager.popMatrix(); GlStateManager.translate(widthForTheThing, 0, 0); partyJoinRequest.getDenyRect().setBounds(x + height + 3 + widthForTheThing, y + height - 25, widthForTheThing - 10, 25); - Gui.drawRect(0, 0, widthForTheThing - 10, 25, hover && partyJoinRequest.getDenyRect().contains(mouseX, mouseY) ? 0xFFAEC0CB : 0xFF99aab5); + RenderUtils.drawRectSafe(0, 0, widthForTheThing - 10, 25, hover && partyJoinRequest.getDenyRect().contains(mouseX, mouseY) ? 0xFFAEC0CB : 0xFF99aab5); GlStateManager.pushMatrix(); text = "Deny"; GlStateManager.translate((widthForTheThing - 10 - fr.getStringWidth(text) * 2) / 2, 15 - fr.FONT_HEIGHT, 0); @@ -259,7 +261,7 @@ public class PartyInviteViewer { GlStateManager.popMatrix(); GlStateManager.translate(widthForTheThing, 0, 0); partyJoinRequest.getIgnoreRect().setBounds(x + height + 3 + widthForTheThing + widthForTheThing, y + height - 25, widthForTheThing - 10, 25); - Gui.drawRect(0, 0, widthForTheThing - 10, 25, hover && partyJoinRequest.getIgnoreRect().contains(mouseX, mouseY) ? 0xFFAEC0CB : 0xFF99aab5); // AEC0CB + RenderUtils.drawRectSafe(0, 0, widthForTheThing - 10, 25, hover && partyJoinRequest.getIgnoreRect().contains(mouseX, mouseY) ? 0xFFAEC0CB : 0xFF99aab5); // AEC0CB GlStateManager.pushMatrix(); text = "Ignore"; GlStateManager.translate((widthForTheThing - 10 - fr.getStringWidth(text) * 2) / 2, 15 - fr.FONT_HEIGHT, 0); |