diff options
author | syeyoung <cyong06@naver.com> | 2021-05-15 19:52:43 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-05-15 19:52:43 +0900 |
commit | e0a46c19ab3e1cab3f3b2f2696094930348f2575 (patch) | |
tree | 8c0bd56042c8487fe415ed00225f1fd11aa31362 /src/main/java/kr/syeyoung/dungeonsguide/gui/elements | |
parent | 1067d2162b54ce172e3dbfce2e80f3532374eb21 (diff) | |
download | Skyblock-Dungeons-Guide-e0a46c19ab3e1cab3f3b2f2696094930348f2575.tar.gz Skyblock-Dungeons-Guide-e0a46c19ab3e1cab3f3b2f2696094930348f2575.tar.bz2 Skyblock-Dungeons-Guide-e0a46c19ab3e1cab3f3b2f2696094930348f2575.zip |
Chroma lines
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/gui/elements')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MEditableAColor.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MEditableAColor.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MEditableAColor.java index 775e299a..f47f1fd0 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MEditableAColor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MEditableAColor.java @@ -26,6 +26,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; 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.*; @@ -63,6 +66,9 @@ public class MEditableAColor extends MPanel { int x = (rectangle.width - getSize().width) / 2; int y = (rectangle.height - getSize().height) / 2; + 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); Gui.drawRect(x,y,x+getSize().width,y+getSize().height, RenderUtils.getColorAt(absMousex - relMousex0, absMousey - relMousey0, color)); Gui.drawRect(x,y,x+getSize().width,y+1, 0xff333333); |