aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/party
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-05-09 13:54:52 +0900
committersyeyoung <cyong06@naver.com>2021-05-09 13:54:52 +0900
commitc7543c833f9bf57c79f8f58c5c91beacb5d986f9 (patch)
tree76aba465eed5a57784d8413373608c6787605408 /src/main/java/kr/syeyoung/dungeonsguide/party
parentc4a55b2540bb79cf087040721fd3146a3fe9ae92 (diff)
downloadSkyblock-Dungeons-Guide-c7543c833f9bf57c79f8f58c5c91beacb5d986f9.tar.gz
Skyblock-Dungeons-Guide-c7543c833f9bf57c79f8f58c5c91beacb5d986f9.tar.bz2
Skyblock-Dungeons-Guide-c7543c833f9bf57c79f8f58c5c91beacb5d986f9.zip
FIX TEXT FLASHING. BLEND GO BRRRRR
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/party')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java
index 299e4b48..db1ebde0 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java
@@ -34,6 +34,8 @@ import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import org.lwjgl.input.Mouse;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL14;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
@@ -226,6 +228,9 @@ public class PartyInviteViewer {
}
}
+ GlStateManager.enableBlend();
+ GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
GlStateManager.pushMatrix();
GlStateManager.translate(height +3,7, 0);
@@ -256,6 +261,9 @@ public class PartyInviteViewer {
GlStateManager.translate((widthForTheThing - 10 - fr.getStringWidth(text) * 2) / 2, 15 - fr.FONT_HEIGHT, 0);
GlStateManager.scale(2.0f, 2.0f, 1.0f);
+ GlStateManager.enableBlend();
+ GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
fr.drawString(text, 0, 0, 0xFFFFFFFF);
GlStateManager.popMatrix();
GlStateManager.translate(widthForTheThing, 0, 0);
@@ -265,6 +273,9 @@ public class PartyInviteViewer {
text = "Deny";
GlStateManager.translate((widthForTheThing - 10 - fr.getStringWidth(text) * 2) / 2, 15 - fr.FONT_HEIGHT, 0);
GlStateManager.scale(2.0f, 2.0f, 1.0f);
+ GlStateManager.enableBlend();
+ GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
fr.drawString(text, 0, 0, 0xFFFFFFFF);
GlStateManager.popMatrix();
GlStateManager.translate(widthForTheThing, 0, 0);
@@ -274,6 +285,9 @@ public class PartyInviteViewer {
text = "Ignore";
GlStateManager.translate((widthForTheThing - 10 - fr.getStringWidth(text) * 2) / 2, 15 - fr.FONT_HEIGHT, 0);
GlStateManager.scale(2.0f, 2.0f, 1.0f);
+ GlStateManager.enableBlend();
+ GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
fr.drawString(text, 0, 0, 0xFFFFFFFF);
GlStateManager.popMatrix();
GlStateManager.popMatrix();
@@ -281,6 +295,9 @@ public class PartyInviteViewer {
GlStateManager.pushMatrix();
GlStateManager.translate(height + 3, height - 28, 0);
GlStateManager.scale(2.0f,2.0f,1.0f);
+ GlStateManager.enableBlend();
+ GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
fr.drawString(partyJoinRequest.getReply().getPast()+" the invite.",0,0,0xFFFFFFFF);
GlStateManager.popMatrix();
}