Different devices resolution - how its done?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
antrax13
Posts: 39
Joined: Mon Jun 01, 2015 11:38 am

Different devices resolution - how its done?

Post by antrax13 » Thu Jun 25, 2015 4:17 pm

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?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Different devices resolution - how its done?

Post by FourthWorld » Thu Jun 25, 2015 4:28 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

zaxos
Posts: 222
Joined: Thu May 23, 2013 11:15 pm

Re: Different devices resolution - how its done?

Post by zaxos » Fri Jun 26, 2015 12:51 am

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.
Knowledge is meant to be shared.

Post Reply