Windows size
#1
Posted 03 May 2012 - 04:20 PM
What I have:
A background that is 1024x690 (~ full screen landscape iPad)
What I need it to do:
Display correctly on an iPad, and scale correctly on an iPhone. I want the phone to basically just shrink it down, and display the whole image on the main phone screen. I can't figure out how to do this for the life of me.
#2
Posted 03 May 2012 - 04:45 PM
But you can also do this in code. You will do this by drawing the background with an object with this code.
draw_sprite_stretched(SPRITE,IMAGE,X,Y,WIDTH,HEIGHT);
Just replace width and height with the width and height you want (the iPhones resolution).
Good luck with your game. (:
#3
Posted 03 May 2012 - 05:02 PM
There are many ways of doing this, and the best is probably to shrink it with Photoshop or a similar program.
But you can also do this in code. You will do this by drawing the background with an object with this code.draw_sprite_stretched(SPRITE,IMAGE,X,Y,WIDTH,HEIGHT);
Just replace width and height with the width and height you want (the iPhones resolution).
Good luck with your game. (:
So I am able to achieve the effect I want by using views, however, the function os_device returns the wrong devices... for instance, os_device = ios_device_ipad when running on my iphone, and os_device = ios_device_iphone_retina when running on my ipad.
Anyone ever seen that?
Edited by stoneyftw, 03 May 2012 - 06:13 PM.
#4
Posted 04 May 2012 - 07:14 AM
Greetings.
There are many ways of doing this, and the best is probably to shrink it with Photoshop or a similar program.
But you can also do this in code. You will do this by drawing the background with an object with this code.draw_sprite_stretched(SPRITE,IMAGE,X,Y,WIDTH,HEIGHT);
Just replace width and height with the width and height you want (the iPhones resolution).
Good luck with your game. (:
So I am able to achieve the effect I want by using views, however, the function os_device returns the wrong devices... for instance, os_device = ios_device_ipad when running on my iphone, and os_device = ios_device_iphone_retina when running on my ipad.
Anyone ever seen that?
According to another post, you should do something like this.
if (YoYo_GetPlatform() & os_ios && YoYo_GetDevice() & device_ios_ipad)
I hope this helps! (:
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











