cpw.mods.fml.client.config

## Class HoverChecker

- java.lang.Object
- - cpw.mods.fml.client.config.HoverChecker

-     public class HoverChecker
      extends java.lang.Object

  This class implements an easy way to check if the mouse has hovered within a certain region of the screen for a given period of time. The region can be defined manually or by supplying a GuiButton object.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HoverChecker(GuiButton button, int threshold)`
    `HoverChecker(int top, int bottom, int left, int right, int threshold)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `checkHover(int mouseX, int mouseY)` Checks if the mouse is in the hover region.
    `boolean` | `checkHover(int mouseX, int mouseY, boolean canHover)` Checks if the mouse is in the hover region.
    `void` | `resetHoverTimer()` Manually resets the hover timer.
    `void` | `updateBounds(int top, int bottom, int left, int right)` Call this method if the intended region has changed such as if the region must follow a scrolling list.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HoverChecker

          public HoverChecker(int top,
                      int bottom,
                      int left,
                      int right,
                      int threshold)

    - #### HoverChecker

          public HoverChecker(GuiButton button,
                      int threshold)

  - ### Method Detail

    - #### updateBounds

          public void updateBounds(int top,
                          int bottom,
                          int left,
                          int right)

      Call this method if the intended region has changed such as if the region must follow a scrolling list. It is not necessary to call this method if a GuiButton defines the hover region.

    - #### checkHover

          public boolean checkHover(int mouseX,
                           int mouseY)

      Checks if the mouse is in the hover region. If the specified time period has elapsed the method returns true. The hover timer is reset if the mouse is not within the region.

    - #### checkHover

          public boolean checkHover(int mouseX,
                           int mouseY,
                           boolean canHover)

      Checks if the mouse is in the hover region. If the specified time period has elapsed the method returns true. The hover timer is reset if the mouse is not within the region.

    - #### resetHoverTimer

          public void resetHoverTimer()

      Manually resets the hover timer.