Page 1 of 1

Different devices resolution - how its done?

Posted: Thu Jun 25, 2015 4:17 pm
by antrax13
Hello,
I am just wondering how would this be handled.

My stack size is 667 width * 375 height
starting point of movable object (Object1) is topleft [0,0]

Then I have button where you click and Starting point will be moved to the right by 100
That means that starting point now is [100,0] (x,y)

Then I will have another object (Object2) with coordinates [100,0] and calculate intersection

because In this case Object1 and Object2 will intersect I can answer true.

Now image application works great on iphone but 1 guy has downloaded it for iPad retina. Same code etc.

Question is will 2 objects intersect on iPad retina if Object1 moved from [0,0] to the right by 100?

Re: Different devices resolution - how its done?

Posted: Thu Jun 25, 2015 4:28 pm
by FourthWorld
Searching Google for "LiveCode multiple resolutions" I found:

How do I make my app scale to fit the screen on all devices?
http://lessons.runrev.com/s/lessons/m/1 ... ll-devices

Displaying Assets On Differing Screen Resolutions
http://lessons.runrev.com/m/4069/l/2868 ... esolutions

How do I support different device screen densities?
http://lessons.runrev.com/m/15262/l/156 ... -densities

There are others if needed.

Re: Different devices resolution - how its done?

Posted: Fri Jun 26, 2015 12:51 am
by zaxos
100 to the right is always 100 to the right, no matter the size of the stack(unless ofc it is smaller than 100px), also if you dont use images in the stack then you dont have to scale it, just resize it to fit the screen and set the topLeft of the btn to 0,0(if thats what you want) in the openStack handler ex:

Code: Select all

on openStack
set the rect of this stack to item 3 of the screenRect,item 4 of the screenRect
set the topLeft of btn 1 to the topLeft of this stack
set the left of btn 2 to the left of btn 1 +100
end openStack
but dont count on my word, i'm usualy wrong when it comes to mobile, only way to find out it to try it. Have fun.
also i'm not sure if its +100 or -100, try and see.