Class cc.EventMouse

Class Summary
Constructor Attributes Constructor Name and Description
 
The mouse event

Method Summary

Class Detail

cc.EventMouse()
The mouse event

Field Detail

<static> <constant> cc.EventMouse.BUTTON_4
The tag of Mouse button 4
<static> <constant> cc.EventMouse.BUTTON_5
The tag of Mouse button 5
<static> <constant> cc.EventMouse.BUTTON_6
The tag of Mouse button 6
<static> <constant> cc.EventMouse.BUTTON_7
The tag of Mouse button 7
<static> <constant> cc.EventMouse.BUTTON_8
The tag of Mouse button 8
<static> <constant> cc.EventMouse.BUTTON_LEFT
The tag of Mouse left button
<static> <constant> cc.EventMouse.BUTTON_MIDDLE
The tag of Mouse middle button (The right button number is 1 on browser)
<static> <constant> cc.EventMouse.BUTTON_RIGHT
The tag of Mouse right button (The right button number is 2 on browser)

Method Detail

  • {number} getButton()
    Gets mouse button
    Returns:
    {number}
  • {cc.Point} getLocation()
    Get cursor location
    Returns:
    {cc.Point} location
  • {cc.Point} getLocationInView()
    returns the current touch location in screen coordinates
    Returns:
    {cc.Point}
  • {number} getLocationX()
    gets location X axis data
    Returns:
    {number}
  • {number} getLocationY()
    gets location Y axis data
    Returns:
    {number}
  • {number} getScrollX()
    gets scrollX data
    Returns:
    {number}
  • {number} getScrollY()
    gets scrollY data
    Returns:
    {number}
  • setButton(button)
    Sets mouse button
    Parameters:
    {number} button
  • setLocation(x, y)
    Set cursor location
    Parameters:
    {number} x
    {number} y
  • setScrollData(scrollX, scrollY)
    sets scroll data
    Parameters:
    {number} scrollX
    {number} scrollY