Clean up code.

This commit is contained in:
SerpentSpirale 2021-07-01 14:50:37 +02:00
parent 6493daaf66
commit bc4e6e7c16
5 changed files with 64 additions and 69 deletions

View file

@ -250,8 +250,8 @@ public class BaseMainActivity extends LoggableActivity {
float x = event.getX();
float y = event.getY();
float mouseX = mousePointer.getTranslationX();
float mouseY = mousePointer.getTranslationY();
float mouseX = mousePointer.getX();
float mouseY = mousePointer.getY();
if (gestureDetector.onTouchEvent(event)) {
mouse_x = (mouseX * scaleFactor);
@ -797,13 +797,13 @@ public class BaseMainActivity extends LoggableActivity {
}
public void placeMouseAdd(float x, float y) {
this.mousePointer.setTranslationX(mousePointer.getTranslationX() + x);
this.mousePointer.setTranslationY(mousePointer.getTranslationY() + y);
this.mousePointer.setX(mousePointer.getX() + x);
this.mousePointer.setY(mousePointer.getY() + y);
}
public void placeMouseAt(float x, float y) {
this.mousePointer.setTranslationX(x);
this.mousePointer.setTranslationY(y);
this.mousePointer.setX(x);
this.mousePointer.setY(y);
}
public void toggleMouse(View view) {