reusable UI comonents, multi resolution and multi language - best approach

reusable UI comonents, multi resolution and multi language - best approach
0.0 0



The game that I am working on will have multiple menu screens with UI components that are the same for each (e.g. Button and textfield styles where only the text changes, background and logo images at the same place).

Is it possible to define these components once and reuse them in different menu screens? What would be the best approach?

Furthermore I need to support multiple resolutions with image resources for the different resolutions and localization in different languages.

How can I automatically load the image resources for the correct resolution?

How can I support multiple languages?



Well what I can tell you, is one create you UI elements in photophop, I like to desgin how everything will be placed in my design resolution, once am happy with this layout I just save the psd file then pop open CS. CS isn’t that stable yet, that is why I do alot of my work in photohop, I import the psd file, now I can add my UI elements, I also convert my layers to smart objects before I save my psd this helps when importing and also when exporting from photoshop to larger resolutions.

Now you can just create a button using your UI element created from photoshop and add a label/Atlas as child to it with what text you desire.

For mult-res, What I did was just export my assets to larger resolutions and copy the entire CS exported folder to HD folder. So design in 480x320, just change the assets resolutions to whatever multiple.

Hope that helps


Thanks for your reply. It gives me some ideas to try out.

Currently I am designing the components in the UI editor and combining them in the scene editor. I haven’t tried the PSD import yet as the design for this game was already completely sliced because I started it out in cocos2d-xna.