aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java
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/gui/elements/MNavigatingPane.java
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/gui/elements/MNavigatingPane.java')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java
index 11772704..d870daf2 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java
@@ -26,6 +26,9 @@ import lombok.Setter;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
+import net.minecraft.client.renderer.GlStateManager;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL14;
import java.awt.*;
import java.util.*;
@@ -83,6 +86,9 @@ public class MNavigatingPane extends MPanel {
Gui.drawRect(1, 16, getBounds().width-1, getBounds().height-1, background2 != null ? background2.getRGB() : 0);
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
+ 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(currentPage.replace(".", " > "), 20, 20, 0xFFFFFFFF);
}
@@ -191,6 +197,9 @@ public class MNavigatingPane extends MPanel {
int x = (getBounds().width - width) / 2;
int y = (getBounds().height - 3 - renderer.FONT_HEIGHT) / 2 + 3;
+ 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);
renderer.drawString(text, x,y, foreground.getRGB());
}