From 0bd0550cc546e1717f6fefc260ed7d064c357b54 Mon Sep 17 00:00:00 2001 From: Rxn69 Date: Tue, 18 Jul 2023 23:09:25 +0530 Subject: [PATCH] fixed keystrokes --- .../rip/athena/client/modules/render/Keystrokes.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/rip/athena/client/modules/render/Keystrokes.java b/src/main/java/rip/athena/client/modules/render/Keystrokes.java index b2046444..ebff673f 100644 --- a/src/main/java/rip/athena/client/modules/render/Keystrokes.java +++ b/src/main/java/rip/athena/client/modules/render/Keystrokes.java @@ -36,6 +36,9 @@ public class Keystrokes extends Module { @ConfigValue.Color(name = "Background Color") private Color backgroundColor = new Color(0, 0, 0, 150); + @ConfigValue.Color(name = "Background Pressed Color") + private Color backgroundColorPressed = new Color(255, 255, 255, 150); + @ConfigValue.Color(name = "Key Unpressed Color") private Color color = Color.WHITE; @@ -91,7 +94,7 @@ public class Keystrokes extends Module { GL11.glPushMatrix(); GL11.glScalef(1.00F, 1.0F, 1.0F); - drawString("W", (posX + shiftX + 7) / 1.005F, (posY + shiftY + 7) / 1.005F, color2); + drawString("W", posX + shiftX + 7, posY + shiftY + 7, color2); GL11.glScalef(1.0F, 1.0F, 1.0F); GL11.glPopMatrix(); } else { @@ -99,7 +102,7 @@ public class Keystrokes extends Module { getBackGroundColor(false), getBackGroundColor(false)); GL11.glPushMatrix(); GL11.glScalef(1.00F, 1.0F, 1.0F); - drawString("W", (posX + shiftX + 7) / 1.005F, (posY + shiftY + 7) / 1.005F, color); + drawString("W", posX + shiftX + 7, posY + shiftY + 7, color); GL11.glScalef(1.0F, 1.0F, 1.0F); GL11.glPopMatrix(); } @@ -373,7 +376,7 @@ public class Keystrokes extends Module { } public int getBackGroundColor(boolean pressed) { - return backgroundColor.getRGB(); + return pressed ? backgroundColorPressed.getRGB() : backgroundColor.getRGB(); } @SubscribeEvent