This project is read-only.

Different Skins on Different Menus

Dec 31, 2011 at 7:49 PM

What is the best way to handle multiple skins? Like on my menu screen I might want to use a different theme than actual in game menus.


Should I create multiple guimanagers with seperate visualizers? Or switch out the visualizers when I start drawing the different sections?

Jan 4, 2012 at 1:53 AM

I'm curious about this as well.

Jan 10, 2012 at 10:07 AM

You could certainly use a different GuiManager for the main menu. It would be the easiest route, as long as you don't want to have controls of both skins in view at the same time.

There's another option that requires more effort but will allow you to have controls from both skins on the screen:

  1. Edit the Skin XML and bitmaps to contain both skins
  2. Derive your own classes from all controls you want in a different skin (empty 3 line classes, no implementation needed, just the derived class as a means to differentiate between the controls in the renderers)
  3. Clone the control renderers for the controls you just derived, make them implement the renderer interface for your derived classes and then draw using the alternative skin