fixed keystrokes
This commit is contained in:
parent
87d17db6af
commit
0bd0550cc5
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue