Skip to content

Commit 875f5e7

Browse files
committed
Fix: HUD hide animation in HudEditor
1 parent 3500a1b commit 875f5e7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

common/src/main/kotlin/com/lambda/graphics/RenderMain.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import com.lambda.graphics.gl.Matrices.resetMatrices
1414
import com.lambda.graphics.renderer.esp.global.StaticESP
1515
import com.lambda.graphics.renderer.esp.global.DynamicESP
1616
import com.lambda.graphics.shader.Shader
17+
import com.lambda.gui.impl.hudgui.LambdaHudGui
1718
import com.lambda.module.modules.client.ClickGui
1819
import com.lambda.module.modules.client.GuiSettings
1920
import com.lambda.util.math.Vec2d
@@ -25,14 +26,16 @@ object RenderMain {
2526
val modelViewMatrix: Matrix4f get() = Matrices.peek()
2627
var screenSize = Vec2d.ZERO
2728

29+
private val showHud get() = mc.currentScreen == null || LambdaHudGui.isOpen
30+
2831
private val hudAnimation0 = with(AnimationTicker()) {
2932
listener<TickEvent.Pre> {
3033
tick()
3134
}
3235

3336
exp(0.0, 1.0, {
34-
if (mc.currentScreen == null) ClickGui.closeSpeed else ClickGui.openSpeed
35-
}) { mc.currentScreen == null }
37+
if (showHud) ClickGui.closeSpeed else ClickGui.openSpeed
38+
}) { showHud }
3639
}
3740

3841
private val frameBuffer = FrameBuffer()

0 commit comments

Comments
 (0)