Fix the Y position of keystrokes

This commit is contained in:
Username404 2021-07-18 11:59:19 +02:00
parent 2851d53b06
commit be7deb3916
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 4 additions and 1 deletions

View File

@ -9,7 +9,10 @@ import net.minecraft.client.Minecraft
@ButtonInfo(Category.HUD)
object Keystrokes: ButtonImplWithHud() {
private val hud = object : ColoredElement(x = 135.0, y = 325.0, height = 36, width = 36, color = Colors.BLACK(), opacity = 0.5F) {
private val hud = object : ColoredElement(x = 135.0, y = 20.0, height = 36, width = 36, color = Colors.BLACK(), opacity = 0.5F) {
override var y: Double
get() = Minecraft.getInstance().window.guiScaledHeight.toDouble() - yOrigin
set(value) = Unit
private val keysArray by lazy {
Minecraft.getInstance().options.run {
arrayOf(keyLeft, keyDown, keyRight, keyUp) to arrayOf(0.5, 0.5, 0.5, 0.5)