Hello,
I’m developing a portrait game that should work on iOS/Android native/browsers AND also on PC/Mac browsers.
I would like to center the game on PC/Mac browsers adding black bars with some limits/restrictions.
Let’s assume my design resolution is 720x1280 (aspect 16:9), I need to support up to 960x1280 (4:3 aspect ratio). If screen is wider than 4:3, I would like to add black bars left and right (to support PC/Mac browsers, that are in landscape).
Obviously my buttons should attach to screen borders, ignoring black bars. For example, I have a QUIT button on the bottom right corner that should get a 50 pixels margin (bottom and right).
On the other hand, if device is 20:9, I don’t want to add any black bars but I need to manage buttons correctly, as 4:3.
Which is the best solution for that, by using Cocos Creator 2.4.3?
Thanks, I already checked it but it cannot support what I need.
I need my design resolution to range from 540x1280 to 960x1280 and then add black bars if lower or higher, height always fixed to 1280.
I think there could be a solution by modifying something on the fly when I intercept changes (cc.view.setResizeCallback). I’m working on it …