A SkinSet is a TextureAtlas, created from a bunch of Images, that form a Skin. SkinSets are created
via SkinSetManager::loadSkin. For example, loadSkin(â€œqguiâ€,"myResourceGroup"); will iterate
through all of Ogreâ€™s resource locations looking for Image files beginning with â€œqguiâ€.
(â€œqgui.button.pngâ€, for example) SkinSets are automatically used whenever possible, there is no
additional steps required from the user. Following the example using â€œqgui.button.pngâ€, the following
line of code would make use of the qgui SkinSet: mButton->setTexture(â€œqgui.button.pngâ€).
The benefit of creating SkinSets is that it minimizes texture batching.
The current maximum size of SkinSet textures is 1024 by 1024.
Also note that QuickGUI supports images that are not a part of any SkinSet, and you are not required to use them.
QuickGUI makes certain assumptions about Images, and how they are used in widgets. Widgets take their
texture name and separate its extension, and use the base name for its functionality. Below are
currently supported naming conventions:
Base + extension
Base + â€œ.overâ€ + extension
Base + â€œ.downâ€ + extension
If you create a button with texture â€œqgui.button.pngâ€, it will make assumptions and use
â€œqgui.button.over.pngâ€ and â€œqgui.button.down.pngâ€. If these textures do not exist, the button will not
be drawn in that state. In the future, I will make sure to have functions to be able to set these
textures, in case you do not want to follow the standard.
Base + extension
Base + â€œ.titlebarâ€ + extension
Base + â€œ.titlebar.buttonâ€ + extension
Base + â€œ.titlebar.button.overâ€ + extension
Base + â€œ.titlebar.button.downâ€ + extension
The list is actually quite long. Please refer to the qgui Skin images, as they match the assumptions
made. Although this may seem like a restriction, it is actually helpful in creating GUIâ€™s quickly, and
forces a intuitive and descriptive filename for each image.
Lets say you have several buttons, and each have a different texture:qgui.button.png
Button* b1 = mySheet->createButton(); // uses qgui.button.png Button* b2 = mySheet->createButton(); // uses qgui.button.png b2->setSkinComponent(".myCoolButton"); // uses qgui.myCoolButton.png
By using the "setSkinComponent" function you can tell Widgets to use a different texture within a SkinSet.