-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pandroid: add option to change screen gamepad, buttons position. #359
Pandroid: add option to change screen gamepad, buttons position. #359
Conversation
|
||
public String formatName(String name) { | ||
name = String.valueOf(name); | ||
while (name.startsWith(" ")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't the 2 loops just be removed by using name.trim()
} | ||
|
||
public void drawSelected(Canvas canvas, Paint paint) { | ||
int[] mePosition = new int[2]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This naming is terrible, mainly cause "me" and the like aren't descriptive at all (and code typically uses "this" instead of "me" the rare times a name like this is actually desired)
int width = selectedView.getLayoutParams().width; | ||
int height = selectedView.getLayoutParams().height; | ||
|
||
int x = viewPosition[0] - mePosition[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are also dx and dy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually no keep them x/y
Done |
Changelog
Screnshots