diff options
author | syeyoung <cyong06@naver.com> | 2021-05-09 13:54:52 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-05-09 13:54:52 +0900 |
commit | c7543c833f9bf57c79f8f58c5c91beacb5d986f9 (patch) | |
tree | 76aba465eed5a57784d8413373608c6787605408 /src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret | |
parent | c4a55b2540bb79cf087040721fd3146a3fe9ae92 (diff) | |
download | Skyblock-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/features/impl/secret')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java index 864f6ce4..663d7893 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java @@ -46,6 +46,7 @@ import net.minecraft.util.MathHelper; import net.minecraftforge.client.event.GuiScreenEvent; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL14; import java.awt.*; import java.util.List; @@ -108,6 +109,9 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis Gui.drawRect(0, 0, feature.width, fr.FONT_HEIGHT + 4, 0xFF444444); Gui.drawRect(1, 1, feature.width - 1, fr.FONT_HEIGHT + 3, 0xFF262626); + 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("Selected: ", 2,2, 0xFFAAAAAA); if (grp.getPath() == null) fr.drawString("Nothing", fr.getStringWidth("Selected: ") + 2,2, 0xFFAA0000); @@ -125,6 +129,9 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis Gui.drawRect(0, 0, feature.width, fr.FONT_HEIGHT + 4, 0xFF444444); Gui.drawRect(1, 1, feature.width - 1, fr.FONT_HEIGHT + 3, 0xFF262626); + 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("Selected: ", 2,2, 0xFFAAAAAA); fr.drawString("Nothing", fr.getStringWidth("Selected: ") + 2,2, 0xFFAA0000); fr.drawString("Open any gui to browse", 2, fr.FONT_HEIGHT + 5, 0xFFAAAAAA); @@ -161,6 +168,9 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis GlStateManager.translate(feature.x, feature.y, 0); Gui.drawRect(0, 0, feature.width, fr.FONT_HEIGHT + 4, 0xFF444444); Gui.drawRect(1, 1, feature.width - 1, fr.FONT_HEIGHT + 3, 0xFF262626); + 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("Selected: ", 2,2, 0xFFAAAAAA); if (grp.getPath() == null) fr.drawString("Nothing", fr.getStringWidth("Selected: ") + 2,2, 0xFFAA0000); @@ -185,6 +195,9 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis } else if (new Rectangle(feature.x, feature.y + fr.FONT_HEIGHT + 6 - dy + i * fr.FONT_HEIGHT, feature.width, fr.FONT_HEIGHT).contains(mouseX, mouseY)) { Gui.drawRect(-1, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF555555); } + 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); if (obj instanceof DungeonMechanic) { String name = sortedMechanicsName.get(i); fr.drawString(name, 3, i * fr.FONT_HEIGHT, 0xFFFFFF00); |