zombie.input
Class Mouse

java.lang.Object
  extended by zombie.input.Mouse

public class Mouse
extends java.lang.Object

this class manages the mouse inputs.


Field Summary
static boolean collisionMode
           
static int hotspotX
           
static int hotspotY
           
static boolean left
          indicates if the left button is down or not
static boolean middle
          indicates if the middle button is down or not
static boolean oldLeft
          indicates if the left button is down or not
static boolean oldMiddle
          indicates if the middle button is down or not
static boolean oldRight
          indicates if the right button is down or not
static boolean right
          indicates if the right button is down or not
static boolean[] UICaptured
           
static boolean useLwjgl
           
 
Constructor Summary
Mouse()
           
 
Method Summary
static int getDeltaX()
           
static int getDeltaY()
           
static int getWheelState()
           
static int getX()
          returns the x coordinate of mouse on the Camera
the coordinates are relative to the game's Camera system
static int getXA()
           
static int getY()
          returns the y coordinate of mouse on the Camera
the coordinates are relative to the game's Camera system
static int getYA()
           
static boolean isButtonDown(int number)
          only with LWJGL
static boolean isButtonDownUICheck(int number)
           
static boolean isGuiMode()
           
static boolean isLeftDown()
           
static boolean isLeftPressed()
           
static boolean isLeftReleased()
           
static boolean isLeftUp()
           
static boolean isMiddleDown()
           
static boolean isMiddlePressed()
           
static boolean isMiddleReleased()
           
static boolean isMiddleUp()
           
static boolean isRightDown()
           
static boolean isRightPressed()
          returns the state of the Weel's mouse
static boolean isRightReleased()
           
static boolean isRightUp()
           
static void loop()
          data loop of mouse: updates the x,y coordiantes and the button status
static void resetClickableObjects()
           
static void setCursor(ITexture image)
           
static void setGuiMode(boolean guiMode)
           
static void setXY(int x, int y)
           
static void UIBlockButtonDown(int number)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

useLwjgl

public static boolean useLwjgl

left

public static boolean left
indicates if the left button is down or not


oldLeft

public static boolean oldLeft
indicates if the left button is down or not


right

public static boolean right
indicates if the right button is down or not


oldRight

public static boolean oldRight
indicates if the right button is down or not


middle

public static boolean middle
indicates if the middle button is down or not


oldMiddle

public static boolean oldMiddle
indicates if the middle button is down or not


collisionMode

public static boolean collisionMode

hotspotX

public static int hotspotX

hotspotY

public static int hotspotY

UICaptured

public static boolean[] UICaptured
Constructor Detail

Mouse

public Mouse()
Method Detail

getDeltaX

public static int getDeltaX()

getDeltaY

public static int getDeltaY()

getWheelState

public static int getWheelState()

getX

public static int getX()
returns the x coordinate of mouse on the Camera
the coordinates are relative to the game's Camera system

Returns:
returns the x coordinate of mouse

getXA

public static int getXA()

getYA

public static int getYA()

getY

public static int getY()
returns the y coordinate of mouse on the Camera
the coordinates are relative to the game's Camera system

Returns:
returns the y coordinate of mouse

isButtonDown

public static boolean isButtonDown(int number)
only with LWJGL

Returns:
returns if the indicates button number is down or not

UIBlockButtonDown

public static void UIBlockButtonDown(int number)

isButtonDownUICheck

public static boolean isButtonDownUICheck(int number)

isGuiMode

public static boolean isGuiMode()

isLeftDown

public static boolean isLeftDown()
Returns:
returns if the left button is down or not

isLeftPressed

public static boolean isLeftPressed()

isLeftReleased

public static boolean isLeftReleased()

isLeftUp

public static boolean isLeftUp()
Returns:
returns if the left button is up or not

isMiddleDown

public static boolean isMiddleDown()
Returns:
returns if the middle button is down or not

isMiddlePressed

public static boolean isMiddlePressed()

isMiddleReleased

public static boolean isMiddleReleased()

isMiddleUp

public static boolean isMiddleUp()
Returns:
returns if the middle button is up or not

isRightDown

public static boolean isRightDown()
Returns:
returns if the right button is down or not

isRightPressed

public static boolean isRightPressed()
returns the state of the Weel's mouse


isRightReleased

public static boolean isRightReleased()

isRightUp

public static boolean isRightUp()
Returns:
returns if the right button is up or not

loop

public static void loop()
data loop of mouse: updates the x,y coordiantes and the button status


resetClickableObjects

public static void resetClickableObjects()

setCursor

public static void setCursor(ITexture image)

setGuiMode

public static void setGuiMode(boolean guiMode)

setXY

public static void setXY(int x,
                         int y)