Fix validation coords
This commit is contained in:
parent
873e458a66
commit
922871be0c
@ -89,10 +89,10 @@ public class Pointer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void validatePosition() {
|
private void validatePosition() {
|
||||||
if (x < 0) x = 0;
|
if (x < 2) x = 2;
|
||||||
else if (x > screenWidth) x = screenWidth;
|
else if (x > screenWidth - 2) x = screenWidth - 2;
|
||||||
|
|
||||||
if (y < 0) y = 0;
|
if (y < 2) y = 2;
|
||||||
else if (y > screenHeight) y = screenHeight;
|
else if (y > screenHeight - 2) y = screenHeight - 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user