Class UIState

java.lang.Object
com.gw2tb.gw2ml.UIState

public final class UIState extends Object
A utility class for interpreting the value of the uiState bitfield.
Since:
0.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Returns whether rotation is enabled for the in-game compass.
    static boolean
    isCompassTopRight(int uiState)
    Returns whether the compass is in the upper right corner of the screen.
    static boolean
    isGameFocused(int uiState)
    Returns whether the game client is currently focused.
    static boolean
    isInCombat(int uiState)
    Returns whether the player is currently in combat.
    static boolean
    isInCompetitiveMode(int uiState)
    Returns whether the player is currently in a competitive mode.
    static boolean
    isMapOpen(int uiState)
    Returns whether the world map is currently open.
    static boolean
    isTextFieldFocused(int uiState)
    Returns whether the input focus is currently owned by a textfield.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • isMapOpen

      public static boolean isMapOpen(int uiState)
      Returns whether the world map is currently open.
      Parameters:
      uiState - the uiState bitfield
      Returns:
      whether the world map is currently open
      Since:
      0.1.0
    • isCompassTopRight

      public static boolean isCompassTopRight(int uiState)
      Returns whether the compass is in the upper right corner of the screen.

      If the compass is not in the upper right corner of the screen, it is in the bottom right corner of the screen.

      Parameters:
      uiState - the uiState bitfield
      Returns:
      whether the compass is in the upper right corner of the screen
      Since:
      0.1.0
    • isCompassRotationEnabled

      public static boolean isCompassRotationEnabled(int uiState)
      Returns whether rotation is enabled for the in-game compass.
      Parameters:
      uiState - the uiState bitfield
      Returns:
      whether rotation is enabled for the in-game compass
      Since:
      0.1.0
    • isGameFocused

      public static boolean isGameFocused(int uiState)
      Returns whether the game client is currently focused.
      Parameters:
      uiState - the uiState bitfield
      Returns:
      whether the game client is currently focused
      Since:
      1.1.0
    • isInCompetitiveMode

      public static boolean isInCompetitiveMode(int uiState)
      Returns whether the player is currently in a competitive mode.
      Parameters:
      uiState - the uiState bitfield
      Returns:
      whether the player is currently in a competitive mode
      Since:
      1.1.0
    • isTextFieldFocused

      public static boolean isTextFieldFocused(int uiState)
      Returns whether the input focus is currently owned by a textfield.

      Notes:

      • This does not work for CoherentUI GUI elements (such as the trading post, gem store and some guildhall interfaces).
      • The bit is not unset consistently when the game loses input focus. (If in doubt, use this in conjunction with isGameFocused(int)).
      Parameters:
      uiState - the uiState bitfield
      Returns:
      whether the input focus is currently owned by a textfield
      Since:
      1.2.0
    • isInCombat

      public static boolean isInCombat(int uiState)
      Returns whether the player is currently in combat.
      Parameters:
      uiState - the uiState bitfield
      Returns:
      whether the player is currently in combat
      Since:
      1.4.0