Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/main/java/com/lambda/mixin/accessor/gui/AccessorGuiScreen.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.lambda.mixin.accessor.gui;

import net.minecraft.client.gui.GuiScreen;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

@Mixin(value = GuiScreen.class)
public interface AccessorGuiScreen {

@Accessor("eventButton")
void setEventButton(final int eventButton);
}
2 changes: 2 additions & 0 deletions src/main/kotlin/com/lambda/client/gui/AbstractLambdaGui.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import com.lambda.client.util.graphics.font.FontRenderAdapter
import com.lambda.client.util.math.Vec2d
import com.lambda.client.util.math.Vec2f
import com.lambda.client.util.threads.safeListener
import com.lambda.mixin.accessor.gui.AccessorGuiScreen
import net.minecraft.client.gui.GuiScreen
import net.minecraft.client.gui.ScaledResolution
import net.minecraft.client.renderer.GlStateManager
Expand Down Expand Up @@ -140,6 +141,7 @@ abstract class AbstractLambdaGui<S : SettingWindow<*>, E : Any> : GuiScreen() {
open fun onDisplayed() {
lastClickedWindow = null
lastEventButton = -1
(this as AccessorGuiScreen).setEventButton(-1)

displayed.value = true

Expand Down
1 change: 1 addition & 0 deletions src/main/resources/mixins.lambda.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"accessor.gui.AccessorGuiChat",
"accessor.gui.AccessorGuiDisconnected",
"accessor.gui.AccessorGuiEditSign",
"accessor.gui.AccessorGuiScreen",
"accessor.network.AccessorCPacketChatMessage",
"accessor.network.AccessorCPacketCloseWindow",
"accessor.network.AccessorCPacketPlayer",
Expand Down