Class MouseHandlerMixin
java.lang.Object
de.luckymcdev.foundryengine.mixin.input.MouseHandlerMixin
- All Implemented Interfaces:
EngineInterface<net.minecraft.client.MouseHandler>, EngineMouseHandler
Blocks game input while a docked window fully covers the game view
(see
ImGuiManager.shouldBlockInput()).
Input that ImGui itself captures is already cancelled by ImGuiMC's input mixins.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidengine$onButton(long handle, net.minecraft.client.input.MouseButtonInfo buttonInfo, int action, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) Cancels mouse button events while the dock blocks game input.voidengine$onMove(long handle, double xpos, double ypos, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) Cancels cursor move events while the dock blocks game input, resetting position off-screen so MC screen widgets don't receive hover/click events at the real cursor position.voidengine$onScroll(long handle, double horizontal, double vertical, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) Cancels scroll events while the dock blocks game input, or forwards to the in-world editor.voidResets internal mouse state and positions the cursor off-screen.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EngineInterface
engine$self
-
Constructor Details
-
MouseHandlerMixin
public MouseHandlerMixin()
-
-
Method Details
-
engine$onButton
public void engine$onButton(long handle, net.minecraft.client.input.MouseButtonInfo buttonInfo, int action, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) Cancels mouse button events while the dock blocks game input.- Specified by:
engine$onButtonin interfaceEngineMouseHandler
-
engine$onScroll
public void engine$onScroll(long handle, double horizontal, double vertical, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) Cancels scroll events while the dock blocks game input, or forwards to the in-world editor.- Specified by:
engine$onScrollin interfaceEngineMouseHandler
-
engine$onMove
public void engine$onMove(long handle, double xpos, double ypos, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) Cancels cursor move events while the dock blocks game input, resetting position off-screen so MC screen widgets don't receive hover/click events at the real cursor position.- Specified by:
engine$onMovein interfaceEngineMouseHandler
-
engine$resetMouse
public void engine$resetMouse()Description copied from interface:EngineMouseHandlerResets internal mouse state and positions the cursor off-screen.- Specified by:
engine$resetMousein interfaceEngineMouseHandler
-