aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-08-03 17:23:41 +0900
committersyeyoung <cyong06@naver.com>2021-08-03 17:23:41 +0900
commit982e460c861579f49959c08e25505a27e9c6b3f0 (patch)
tree4cccbe086fd69f5f5be138a3eb24237e0211b76e /src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java
parentd1c36c2412b98350f8336e38361e49b3655982d5 (diff)
downloadSkyblock-Dungeons-Guide-982e460c861579f49959c08e25505a27e9c6b3f0.tar.gz
Skyblock-Dungeons-Guide-982e460c861579f49959c08e25505a27e9c6b3f0.tar.bz2
Skyblock-Dungeons-Guide-982e460c861579f49959c08e25505a27e9c6b3f0.zip
Too many changes to describe
Config gui overhaul. v2
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java b/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java
index e9518d64..685b8489 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java
@@ -55,6 +55,35 @@ public class RenderUtils {
public static boolean allowScrolling;
public static int scrollX = 0;
+ public static void drawGradientRect(int left, int top, int right, int bottom, int startColor, int endColor)
+ {
+ float f = (float)(startColor >> 24 & 255) / 255.0F;
+ float f1 = (float)(startColor >> 16 & 255) / 255.0F;
+ float f2 = (float)(startColor >> 8 & 255) / 255.0F;
+ float f3 = (float)(startColor & 255) / 255.0F;
+ float f4 = (float)(endColor >> 24 & 255) / 255.0F;
+ float f5 = (float)(endColor >> 16 & 255) / 255.0F;
+ float f6 = (float)(endColor >> 8 & 255) / 255.0F;
+ float f7 = (float)(endColor & 255) / 255.0F;
+ GlStateManager.disableTexture2D();
+ GlStateManager.enableBlend();
+ GlStateManager.disableAlpha();
+ GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
+ GlStateManager.shadeModel(7425);
+ Tessellator tessellator = Tessellator.getInstance();
+ WorldRenderer worldrenderer = tessellator.getWorldRenderer();
+ worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
+ worldrenderer.pos((double)right, (double)top, (double)0).color(f1, f2, f3, f).endVertex();
+ worldrenderer.pos((double)left, (double)top, (double)0).color(f1, f2, f3, f).endVertex();
+ worldrenderer.pos((double)left, (double)bottom, (double)0).color(f5, f6, f7, f4).endVertex();
+ worldrenderer.pos((double)right, (double)bottom, (double)0).color(f5, f6, f7, f4).endVertex();
+ tessellator.draw();
+ GlStateManager.shadeModel(7424);
+ GlStateManager.disableBlend();
+ GlStateManager.enableAlpha();
+ GlStateManager.enableTexture2D();
+ }
+
public static void drawRect(int left, int top, int right, int bottom, AColor color)
{
if (left < right)