类 MouseCaptureUtil

java.lang.Object
org.hiedacamellia.immersiveui.util.MouseCaptureUtil

public class MouseCaptureUtil extends Object
A convenience utility class for handling mouse capture without screen This class is generally threadsafe
  • 方法详细资料

    • 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