Class AndroidMouseInput14
java.lang.Object
com.jme3.input.android.AndroidMouseInput14
- All Implemented Interfaces:
com.jme3.input.Input, com.jme3.input.MouseInput
- Direct Known Subclasses:
AndroidMouseInput24
AndroidMouseInput14 implements MouseInput to add mouse support for jME3
uses the onGenericMotion events that where added in Android rev 12 and MotionEvent.getButtonState
from Android rev 14 so added "14" suffix to the class to specify the Android required rev and
match other classes naming- Author:
- joliver82
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface com.jme3.input.MouseInput
AXIS_WHEEL, AXIS_X, AXIS_Y, BUTTON_LEFT, BUTTON_MIDDLE, BUTTON_RIGHT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaddMouseButtonEvent(boolean left, boolean right, boolean center, int x, int y) protected voidaddMouseMotionEventFixedPositions(int x, int y, int deltaWheel) protected voidaddMouseMotionEventRelativePositions(int deltaX, int deltaY, int deltaWheel) voiddestroy()intlongprotected intgetJmeX(float origX) protected intgetJmeY(float origY) voidbooleanvoidloadSettings(com.jme3.system.AppSettings settings) booleanonGenericMotion(android.view.MotionEvent event) booleanonHover(android.view.MotionEvent event) voidsetCursorVisible(boolean visible) voidsetInputListener(com.jme3.input.RawInputListener listener) voidsetNativeCursor(com.jme3.cursors.plugins.JmeCursor cursor) voidupdate()
-
Field Details
-
inputHandler
-
-
Constructor Details
-
AndroidMouseInput14
-
-
Method Details
-
getJmeX
protected int getJmeX(float origX) -
getJmeY
protected int getJmeY(float origY) -
loadSettings
public void loadSettings(com.jme3.system.AppSettings settings) -
addMouseMotionEventFixedPositions
protected void addMouseMotionEventFixedPositions(int x, int y, int deltaWheel) -
addMouseMotionEventRelativePositions
protected void addMouseMotionEventRelativePositions(int deltaX, int deltaY, int deltaWheel) -
addMouseButtonEvent
protected boolean addMouseButtonEvent(boolean left, boolean right, boolean center, int x, int y) -
onHover
public boolean onHover(android.view.MotionEvent event) -
onGenericMotion
public boolean onGenericMotion(android.view.MotionEvent event) -
setCursorVisible
public void setCursorVisible(boolean visible) - Specified by:
setCursorVisiblein interfacecom.jme3.input.MouseInput
-
getButtonCount
public int getButtonCount()- Specified by:
getButtonCountin interfacecom.jme3.input.MouseInput
-
setNativeCursor
public void setNativeCursor(com.jme3.cursors.plugins.JmeCursor cursor) - Specified by:
setNativeCursorin interfacecom.jme3.input.MouseInput
-
initialize
public void initialize()- Specified by:
initializein interfacecom.jme3.input.Input
-
update
public void update()- Specified by:
updatein interfacecom.jme3.input.Input
-
destroy
public void destroy()- Specified by:
destroyin interfacecom.jme3.input.Input
-
isInitialized
public boolean isInitialized()- Specified by:
isInitializedin interfacecom.jme3.input.Input
-
setInputListener
public void setInputListener(com.jme3.input.RawInputListener listener) - Specified by:
setInputListenerin interfacecom.jme3.input.Input
-
getInputTimeNanos
public long getInputTimeNanos()- Specified by:
getInputTimeNanosin interfacecom.jme3.input.Input
-