mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-20 21:40:15 -07:00
same improvements, but for the virtual mouse
This commit is contained in:
parent
5c932b0851
commit
081a618a0f
1 changed files with 7 additions and 3 deletions
|
|
@ -279,7 +279,13 @@ public class BaseMainActivity extends LoggableActivity {
|
||||||
|
|
||||||
float x = event.getX();
|
float x = event.getX();
|
||||||
float y = event.getY();
|
float y = event.getY();
|
||||||
|
if(event.getHistorySize() > 0) {
|
||||||
|
prevX = event.getHistoricalX(0);
|
||||||
|
prevY = event.getHistoricalY(0);
|
||||||
|
}else{
|
||||||
|
prevX = x;
|
||||||
|
prevY = y;
|
||||||
|
}
|
||||||
float mouseX = mousePointer.getTranslationX();
|
float mouseX = mousePointer.getTranslationX();
|
||||||
float mouseY = mousePointer.getTranslationY();
|
float mouseY = mousePointer.getTranslationY();
|
||||||
|
|
||||||
|
|
@ -315,8 +321,6 @@ public class BaseMainActivity extends LoggableActivity {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
prevX = x;
|
|
||||||
prevY = y;
|
|
||||||
|
|
||||||
debugText.setText(CallbackBridge.DEBUG_STRING.toString());
|
debugText.setText(CallbackBridge.DEBUG_STRING.toString());
|
||||||
CallbackBridge.DEBUG_STRING.setLength(0);
|
CallbackBridge.DEBUG_STRING.setLength(0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue