retina display / standard
Monkey Targets Forums/iOS/retina display / standard
| ||
How do we detect this in monkey to swap out the media etc? |
| ||
DeviceWidth() DeviceHeight() Works on android. |
| ||
You should always deliver two Image Files, ImageName@... ImageName.png The @2x is for retina support and HD Games and Apps and the other File is the lowscaled version of the same Image. So you should always design your Images as HD/Retina resoluted File (which is 960x640 Portrait / 640x960 Landscape) and finally scale it down for older Devices like IPhone 2/3 etc (which is 320x480 Portrait / 480x320 Landscape) Just take your retina file and half size it and save it without the @2x tag! Just scale your workspace and you can see how large your Buttons will be. Dont start with a 320x480 Image and scale it up to Retina.. This will only result with a large file and no quality improvements. iOS calculates all as 320x480. if it finds a @2x Retina File and the Device supports it, it will use that instead |
| ||
Ok i tested it, 2x Images work like a charm! |
| ||
Just scale your workspace and you can see how large your Buttons will be. Actually i'm wondering how exactly we do this since it states in the Docs that we can't set the screen size from mojo, but only from the native code itself? |
| ||
Call me stupid, but do you have to just specify the non@2x file when you load images, and IOS loads automatically the correct file, depending if the device has a retina display or not? |
| ||
yes exactly mike. UIImage's are handling this automatically well i mean scale the workspace inside your graphic editor so all your images are resoluted for 960x640 in example |
| ||
Isn't it better if you handle it manually in order for it to work with android devices too? |
| ||
well i personally check for the target first, so i can leave it on ios and use it with @2x automatisation |
| ||
Thanks Xzess for the info. |