mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-19 13:00:12 -07:00
Support sub-pixel cursor precision
This commit is contained in:
parent
37202f21cd
commit
d183c991a0
4 changed files with 13 additions and 13 deletions
|
|
@ -49,7 +49,7 @@ public class BaseMainActivity extends LoggableActivity {
|
|||
public double sensitivityFactor;
|
||||
private final int fingerStillThreshold = (int) Tools.dpToPx(9);
|
||||
private float initialX, initialY;
|
||||
private int scrollInitialX, scrollInitialY;
|
||||
private float scrollInitialX, scrollInitialY;
|
||||
private float prevX, prevY;
|
||||
private int currentPointerID;
|
||||
|
||||
|
|
@ -62,8 +62,8 @@ public class BaseMainActivity extends LoggableActivity {
|
|||
switch (msg.what) {
|
||||
case MSG_LEFT_MOUSE_BUTTON_CHECK:
|
||||
if(LauncherPreferences.PREF_DISABLE_GESTURES) break;
|
||||
int x = CallbackBridge.mouseX;
|
||||
int y = CallbackBridge.mouseY;
|
||||
float x = CallbackBridge.mouseX;
|
||||
float y = CallbackBridge.mouseY;
|
||||
if (CallbackBridge.isGrabbing() &&
|
||||
Math.abs(initialX - x) < fingerStillThreshold &&
|
||||
Math.abs(initialY - y) < fingerStillThreshold) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue