mirror of
https://github.com/TeamMidnightDust/MidnightControls.git
synced 2025-12-14 07:35:10 +01:00
Port to 1.20.2 & Revamp Touchscreen Input
- Port to 1.20.2 - Fixed virtual mouse cursor sometimes being hidden behind objects (closes #221) - Touchscreen is now actually usable (in theory, I'll have to wait a few weeks for my tablet to arrive to test further) - Made it possible to place/break blocks and interact with entities - Added a touchscreen mode for interacting with entities and blocks at the position the click was registered at, not just at the crosshair - Added a close button to screens without their own back button - Will be officially released when SpruceUI is updated
This commit is contained in:
@@ -21,9 +21,7 @@ import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.font.TextRenderer;
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.resource.language.I18n;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
import net.minecraft.util.Identifier;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
@@ -234,6 +232,7 @@ public class MidnightControlsRenderer {
|
||||
}
|
||||
|
||||
//context.getMatrices().push();
|
||||
context.getMatrices().translate(0f, 0f, 999f);
|
||||
drawCursor(context, mouseX, mouseY, hoverSlot, client);
|
||||
//context.getMatrices().pop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user