Minor cleanup of mouse / keyboard methods for touch.
Depreciated InputManager.getSimluateMouse and replaced with InputManager.isSimulateMouse for consistancy. Removed depreciated TouchInput.getSimulateMouse(). Added InputManager.isSimulateKeyboard() to keep consistancy with mouse methods.
This commit is contained in:
parent
a116389814
commit
a55aae21f9
@ -242,10 +242,6 @@ public class AndroidInputHandler implements TouchInput {
|
||||
return mouseEventsEnabled;
|
||||
}
|
||||
|
||||
public boolean getSimulateMouse() {
|
||||
return mouseEventsEnabled;
|
||||
}
|
||||
|
||||
public boolean isMouseEventsInvertX() {
|
||||
return mouseEventsInvertX;
|
||||
}
|
||||
|
@ -764,12 +764,25 @@ public class InputManager implements RawInputListener {
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @deprecated Use isSimulateMouse
|
||||
* Returns state of simulation of mouse events. Used for touchscreen input only.
|
||||
*
|
||||
*/
|
||||
public boolean getSimulateMouse() {
|
||||
if (touch != null) {
|
||||
return touch.getSimulateMouse();
|
||||
return touch.isSimulateMouse();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns state of simulation of mouse events. Used for touchscreen input only.
|
||||
*
|
||||
*/
|
||||
public boolean isSimulateMouse() {
|
||||
if (touch != null) {
|
||||
return touch.isSimulateMouse();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@ -786,6 +799,18 @@ public class InputManager implements RawInputListener {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns state of simulation of key events. Used for touchscreen input only.
|
||||
*
|
||||
*/
|
||||
public boolean isSimulateKeyboard() {
|
||||
if (touch != null) {
|
||||
return touch.isSimulateKeyboard();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void processQueue() {
|
||||
int queueSize = inputQueue.size();
|
||||
RawInputListener[] array = getRawListenerArray();
|
||||
|
@ -73,13 +73,6 @@ public interface TouchInput extends Input {
|
||||
*/
|
||||
public void setSimulateMouse(boolean simulate);
|
||||
|
||||
/**
|
||||
* Get if mouse events are generated
|
||||
* @deprecated Use {@link #isSimulateMouse() }.
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean getSimulateMouse();
|
||||
|
||||
/**
|
||||
* @return true if mouse event simulation is enabled, false otherwise.
|
||||
*/
|
||||
|
@ -97,11 +97,6 @@ public class IosInputHandler implements TouchInput {
|
||||
this.mouseEventsEnabled = simulate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getSimulateMouse() {
|
||||
return mouseEventsEnabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSimulateMouse() {
|
||||
return mouseEventsEnabled;
|
||||
|
Loading…
x
Reference in New Issue
Block a user