类 MouseCaptureUtil
java.lang.Object
org.hiedacamellia.immersiveui.util.MouseCaptureUtil
A convenience utility class for handling mouse capture without screen
This class is generally threadsafe
-
方法概要
修饰符和类型方法说明static doubleGets the and reset captured delta X Get the delta x movement between current and previous position, then set the x delta movement back to 0 for next capturestatic doubleGets the and reset captured delta Y.static booleanChecks if mouse captured.static voidStart mouse capture, meaning mouse movement no longer move player's camerastatic voidStop mouse capture.
-
方法详细资料
-
isMouseCaptured
public static boolean isMouseCaptured()Checks if mouse captured.- 返回:
- true, if mouse is captured
-
startMouseCapture
public static void startMouseCapture()Start mouse capture, meaning mouse movement no longer move player's camera -
stopMouseCapture
public static void stopMouseCapture()Stop mouse capture. -
getAndResetCapturedDeltaX
public static double getAndResetCapturedDeltaX()Gets the and reset captured delta X Get the delta x movement between current and previous position, then set the x delta movement back to 0 for next capture- 返回:
- the and reset captured delta X
-
getAndResetCapturedDeltaY
public static double getAndResetCapturedDeltaY()Gets the and reset captured delta Y. Get the delta y movement between current and previous position, then set the y delta movement back to 0 for next capture- 返回:
- the and reset captured delta Y
-