public Dragging keyStrokes = Main.createDrag(this, "KeyStrokes", 200, 50);
private void onNotif(MatrixStack stack) {
float posX = this.keyStrokes.getX() + 5.0F;
float posY = this.keyStrokes.getY() - 28.0F;
int offset = 10;
int headerHeight = 45;
int width = 70;
float height = (float)(this.activeModules * offset);
int firstColor = ColorUtil.getColorStyle(0.0F);
int secondColor = ColorUtil.getColorStyle(90.0F);
this.heightDynamic = AnimationMath.fast(this.heightDynamic, height, 10.0F);
int keyPressedW = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 87);
int keyPressedS = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 83);
int keyPressedA = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 65);
int keyPressedD = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 68);
int keyPressedSPACE = GLFW.glfwGetKey(mc.getMainWindow().getHandle(), 32);
RenderUtil.Render2D.drawRoundedRect(posX + 29.5F, posY + 13.5F, 17.0F, 17.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
RenderUtil.Render2D.drawRoundedRect(posX + 29.5F, posY + 32.0F, 17.0F, 17.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
RenderUtil.Render2D.drawRoundedRect(posX + 29.5F - 19.0F, posY + 32.0F, 17.0F, 17.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
RenderUtil.Render2D.drawRoundedRect(posX + 29.5F + 19.0F, posY + 32.0F, 17.0F, 17.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
RenderUtil.Render2D.drawRoundedRect(posX + 29.5F - 19.0F, posY + 32.0F + 18.0F, 56.0F, 15.0F, 2.0F, (new Color(30, 30, 30, 250)).getRGB());
if (keyPressedW == 1) {
RenderUtil.Render2D.drawGradientRound(posX + 31.0F, posY + 14.9F, 14.0F, 14.0F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
}
if (keyPressedS == 1) {
RenderUtil.Render2D.drawGradientRound(posX + 31.0F, posY + 33.4F, 14.0F, 14.0F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
}
if (keyPressedA == 1) {
RenderUtil.Render2D.drawGradientRound(posX + 31.0F - 19.0F, posY + 33.4F, 14.0F, 14.0F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
}
if (keyPressedD == 1) {
RenderUtil.Render2D.drawGradientRound(posX + 31.0F + 19.0F, posY + 33.4F, 14.0F, 14.0F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
}
if (keyPressedSPACE == 1) {
RenderUtil.Render2D.drawGradientRound(posX + 31.0F - 19.0F, posY + 33.4F + 18.0F, 53.0F, 12.2F, 1.5F, firstColor, secondColor, ColorUtil.getColorStyle(180.0F), ColorUtil.getColorStyle(270.0F));
}
Fonts.sfbold[19].drawCenteredString(stack, "W", (double)(posX + 38.0F), (double)(posY + 19.0F), -1);
Fonts.sfbold[19].drawCenteredString(stack, "A", (double)(posX - 19.0F + 38.0F), (double)(posY + 18.0F + 20.0F), -1);
Fonts.sfbold[19].drawCenteredString(stack, "S", (double)(posX + 38.0F), (double)(posY + 18.0F + 20.0F), -1);
Fonts.sfbold[19].drawCenteredString(stack, "D", (double)(posX + 19.0F + 38.0F), (double)(posY + 18.0F + 20.0F), -1);
Fonts.sfbold[19].drawCenteredString(stack, "SPACE", (double)(posX + 38.0F), (double)(posY + 18.0F + 20.0F + 15.5F), -1);
this.keyStrokes.setWidth((float)width);
this.keyStrokes.setHeight((float)headerHeight);
}