I’ve developed an app principally for iPad, therefore have everything 1024*768
I’ve now decided to release it on iphone, and don’t want to reset all images.
The only iPhone problem is large images in backgrounds. These are full screen or almost and on iPhone they only take up quarter of the screen. All other graphics scale down correctly.
I’ve tried making an exception with system.getInfo( “model” ) and created a 320*240 image for iphone, but this is still not making a difference.
It looks fine on simulator (Windows) but not on build.
Any ideas? [import]uid: 120570 topic_id: 27331 reply_id: 327331[/import]
Just guessing, since I haven’t seen your code.
Check the x and y values of your background image by printing them out. There is a chance that they are set to 0, 0. So, if the center of your image is 0,0 it makes since that only a quarter of it is visible on the screen.
I think this problem come from the issue that in many cases you provide an x and y value that represent where the center of the image will be, but there are a few cases where you provide an x and y that are for the upper left corner of the image.
Just set the values to the center of the screen, after the object is created.
[import]uid: 67839 topic_id: 27331 reply_id: 111070[/import]
Hi Couldn’t you just use example a config.lua file?
place this within your folder with the main.lua
application =
{
content =
{
width = 1024,
height = 768,
scale = "letterbox"
},
}
hope this helps, i hope i understood the problem correctly
[import]uid: 99036 topic_id: 27331 reply_id: 111096[/import]
That works for almost everything, apart from full screen graphics and two animation (which I repositioned).
I have a work-around of sorts, fine for iPhone4, can’t test on 3GS. I set the scale for the backgrounds to 2.4!
It’s as though despite the graphics being 768 high, the iPhone treats them as 320 high and needs the scale to (a) bring it back to 768 and then (b) resize down to 640 high. Weird. [import]uid: 120570 topic_id: 27331 reply_id: 111099[/import]