Chroma rectangles
This commit is contained in:
parent
d4bf5e8052
commit
3987f44574
|
@ -59,6 +59,8 @@ public class Mod {
|
||||||
RenderUtils.drawRect(left, top, right, bottom, new Color(255, 255, 255, 200).getRGB());
|
RenderUtils.drawRect(left, top, right, bottom, new Color(255, 255, 255, 200).getRGB());
|
||||||
case 3:
|
case 3:
|
||||||
RenderUtils.drawRect(left, top, right, bottom, new Color(0, 0, 0, 140).getRGB());
|
RenderUtils.drawRect(left, top, right, bottom, new Color(0, 0, 0, 140).getRGB());
|
||||||
|
case 4:
|
||||||
|
RenderUtils.drawChromaRect(left, top, right, bottom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,31 @@ public class RenderUtils {
|
||||||
GlStateManager.disableBlend();
|
GlStateManager.disableBlend();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void drawChromaRect(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);
|
||||||
|
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_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, 0).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 Color getColorWithoutRGB(ModeSetting asdf) {
|
public static Color getColorWithoutRGB(ModeSetting asdf) {
|
||||||
switch (asdf.getValue()) {
|
switch (asdf.getValue()) {
|
||||||
case "Red":
|
case "Red":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user