diff --git a/src/main/java/dev/resent/util/render/RenderUtils.java b/src/main/java/dev/resent/util/render/RenderUtils.java index 7cc8d607..4255a8e0 100644 --- a/src/main/java/dev/resent/util/render/RenderUtils.java +++ b/src/main/java/dev/resent/util/render/RenderUtils.java @@ -44,6 +44,38 @@ public class RenderUtils { } } } + + public static void drawChromaRect(int zLevel, int x, int y, int width, int height) { + GlStateManager.pushMatrix(); + GlStateManager.translate((float)x, (float)(y + height), (float)0.0f); + GlStateManager.rotate((float)-90.0f, (float)0.0f, (float)0.0f, (float)1.0f); + boolean p_drawGradientRect_1_ = false; + boolean p_drawGradientRect_2_ = false; + int p_drawGradientRect_5_ = Color.HSBtoRGB((float)((System.currentTimeMillis() - (long)x * 10L - (long)y * 10L) % 2000L) / 2000.0f, 0.8f, 0.8f); + int p_drawGradientRect_6_ = Color.HSBtoRGB((float)((System.currentTimeMillis() - (long)(x + width / 2) * 10L - (long)y * 10L) % 2000L) / 2000.0f, 0.8f, 0.8f); + float lvt_7_1_ = (float)(p_drawGradientRect_5_ >> 24 & 0xFF) / 255.0f; + float lvt_8_1_ = (float)(p_drawGradientRect_5_ >> 16 & 0xFF) / 255.0f; + float lvt_9_1_ = (float)(p_drawGradientRect_5_ >> 8 & 0xFF) / 255.0f; + float lvt_10_1_ = (float)(p_drawGradientRect_5_ & 0xFF) / 255.0f; + float lvt_11_1_ = (float)(p_drawGradientRect_6_ >> 24 & 0xFF) / 255.0f; + float lvt_12_1_ = (float)(p_drawGradientRect_6_ >> 16 & 0xFF) / 255.0f; + float lvt_13_1_ = (float)(p_drawGradientRect_6_ >> 8 & 0xFF) / 255.0f; + float lvt_14_1_ = (float)(p_drawGradientRect_6_ & 0xFF) / 255.0f; + GlStateManager.disableTexture2D(); + GlStateManager.enableBlend(); + GlStateManager.enableAlpha(); + GlStateManager.tryBlendFuncSeparate((int)770, (int)771, (int)1, (int)0); + GlStateManager.shadeModel((int)7425); + Tessellator lvt_15_1_ = Tessellator.getInstance(); + WorldRenderer lvt_16_1_ = lvt_15_1_.getWorldRenderer(); + lvt_16_1_.begin(7, DefaultVertexFormats.POSITION_COLOR); + lvt_16_1_.pos((double)height, (double)width, (double)zLevel).color(lvt_12_1_, lvt_13_1_, lvt_14_1_, lvt_11_1_).endVertex(); + lvt_15_1_.draw(); + GlStateManager.shadeModel((int)7424); + GlStateManager.disableBlend(); + GlStateManager.enableTexture2D(); + GlStateManager.popMatrix(); + } public static int astolfoColorsDraw(float yOffset, int yTotal, float speed) { float hue = (float) (System.currentTimeMillis() % (int) speed) + ((yTotal - yOffset) * 9); diff --git a/src/main/java/dev/resent/visual/ui/clickgui/rewrite/ClickGuiRewrite.java b/src/main/java/dev/resent/visual/ui/clickgui/rewrite/ClickGuiRewrite.java index b4412b36..5e9b28ff 100644 --- a/src/main/java/dev/resent/visual/ui/clickgui/rewrite/ClickGuiRewrite.java +++ b/src/main/java/dev/resent/visual/ui/clickgui/rewrite/ClickGuiRewrite.java @@ -118,14 +118,14 @@ public class ClickGuiRewrite extends GuiScreen { //Gear if (m.doesHaveSetting()) { - GlStateManager.color(1, 1, 1); + GlStateManager.color(1, 1, 1); mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/gear2.png")); Gui.drawModalRectWithCustomSizedTexture(x + width - 60, (int) y + 140 + offset + scrollOffset, 0, 0, 20, 20, 20, 20); - } + } //RenderUtils.drawRoundedRect(x+width-60, y+140+offset, x+width-40, y+160+offset, 4, -1); //Toggle - RenderUtils.drawRoundedRect(x + 90, y + 125 + offset + scrollOffset, x + 140, y + 175 + offset + scrollOffset, 8, new Color(66, 66, 66).getRGB()); + RenderUtils.drawRoundedRect(x + 90, y + 125 + offset + scrollOffset, x + 140, y + 175 + offset + scrollOffset, 8, m.isEnabled() ? onSurfaceColor : new Color(66, 66, 66).getRGB()); GlUtils.startScale(x + 90, y + 140 + offset + scrollOffset, 2); fr.drawString(m.getName(), x + 120, y + 140 + offset + scrollOffset, -1, false);