public class MouseHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private double |
accumulatedScrollDelta |
private int |
activeButton |
private double |
eventTime |
private boolean |
ignoreFirstMove |
private double |
lastLookTime |
private boolean |
leftDown |
private boolean |
middleDown |
private Minecraft |
minecraft |
private boolean |
mouseGrabbed |
private double |
mouseX |
private double |
mouseY |
private boolean |
rightDown |
private int |
simulatedRightClicks |
private int |
touchScreenCounter |
private MouseSmoother |
xSmoother |
private double |
xVelocity |
private MouseSmoother |
ySmoother |
private double |
yVelocity |
Constructor and Description |
---|
MouseHelper(Minecraft minecraftIn) |
Modifier and Type | Method and Description |
---|---|
private void |
cursorPosCallback(long handle,
double xpos,
double ypos) |
double |
getMouseX() |
double |
getMouseY() |
double |
getXVelocity() |
double |
getYVelocity() |
void |
grabMouse() |
boolean |
isLeftDown() |
boolean |
isMiddleDown() |
boolean |
isMouseGrabbed() |
boolean |
isRightDown() |
private void |
mouseButtonCallback(long handle,
int button,
int action,
int mods) |
void |
registerCallbacks(long handle) |
private void |
scrollCallback(long handle,
double xoffset,
double yoffset) |
void |
setIgnoreFirstMove() |
void |
ungrabMouse() |
void |
updatePlayerLook() |
private final Minecraft minecraft
private boolean leftDown
private boolean middleDown
private boolean rightDown
private double mouseX
private double mouseY
private int simulatedRightClicks
private int activeButton
private boolean ignoreFirstMove
private int touchScreenCounter
private double eventTime
private final MouseSmoother xSmoother
private final MouseSmoother ySmoother
private double xVelocity
private double yVelocity
private double accumulatedScrollDelta
private double lastLookTime
private boolean mouseGrabbed
public MouseHelper(Minecraft minecraftIn)
private void mouseButtonCallback(long handle, int button, int action, int mods)
private void scrollCallback(long handle, double xoffset, double yoffset)
public void registerCallbacks(long handle)
private void cursorPosCallback(long handle, double xpos, double ypos)
public void updatePlayerLook()
public boolean isLeftDown()
public boolean isRightDown()
public boolean isMiddleDown()
public double getMouseX()
public double getMouseY()
public double getXVelocity()
public double getYVelocity()
public void setIgnoreFirstMove()
public boolean isMouseGrabbed()
public void grabMouse()
public void ungrabMouse()