Skip to content
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

drillScan: Not using act coordinates properly #165

Open
davecparker opened this issue Dec 15, 2015 · 2 comments
Open

drillScan: Not using act coordinates properly #165

davecparker opened this issue Dec 15, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@davecparker
Copy link
Owner

Recent change to fix iPad aspect has shaken out bugs in the layout of drillScan, which are now visible on all devices. For example:

local H = act.height
...
infoConsole.y = H - 2 * H / 5

does not properly position relative to the act. This is absolute from y = 0 (which is now in a different location on most devices). Display objects in an act should be positioned relative to act.yMin, act.yMax, or act.yCenter (and similar for x), then they will adapt correctly. Since the infoConsole is supposed to be on the bottom of the act, you probably want to position it at y = act.yMax - something. Similar for other objects in there too.

@davecparker davecparker added this to the Xmas milestone Dec 15, 2015
@arshiahf
Copy link
Contributor

Fixed

@davecparker
Copy link
Owner Author

Still not quite right. Your W and H variables are sometimes used as absolute coordinates, sometimes as width/height. You can see one example bug in your info window, which is not sized/positioned correctly for e.g. iPhone 6. Scanning your code, I think there will be other bugs too. A lot of your code looks like it was originally written assuming a coordinate system of (0, 0) - (W, H). There is no easy way to simply redefine your W and H to fix this. You cannot assume either x or y start at 0.

I will post an article to the Mars group trying to explain more about how to use act coordinates.

@davecparker davecparker reopened this Dec 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants