kungfoomasta
14-11-2007 19:05:42
I want to limit SkinSets by image type, for organization and ease of use. This would mean any particular SkinSet would only be made of images of the same type, for example a SkinSet could be only .png files, or only .jpg files.
Currently there are two methods to changing the appearance of a Widget:
Widget::setTexture
Widget::setSkin
The setSkin method is more likely to become the popular choice, because it changes the appearance of the entire widget, not just one component, and can also be recursive. For example, window->setTexture("x.png") will only change the windows background texture, but window->setSkin("x") will change the background, borders, TitleBar and Close Button.
Right now I require the user to supply the extension of the texture to use for setSkin, and assume ".png" if extension isn't given. This is inconvenient for people who use ".jpg" for all their textures, or any other images supported by Ogre, requiring the user to keep track of their texture types.
The changes would be noticed when creating a skin:
SkinSetManager::getSingleton().loadSkin("qgui",".png","myResourceGroup");
The SkinSet "qgui" would only be made of .png files. You can use as many skins as you like in your app, I just want the SkinSet to be limited to a particular image extension.
Are there any problems with this?
Currently there are two methods to changing the appearance of a Widget:
Widget::setTexture
Widget::setSkin
The setSkin method is more likely to become the popular choice, because it changes the appearance of the entire widget, not just one component, and can also be recursive. For example, window->setTexture("x.png") will only change the windows background texture, but window->setSkin("x") will change the background, borders, TitleBar and Close Button.
Right now I require the user to supply the extension of the texture to use for setSkin, and assume ".png" if extension isn't given. This is inconvenient for people who use ".jpg" for all their textures, or any other images supported by Ogre, requiring the user to keep track of their texture types.
The changes would be noticed when creating a skin:
SkinSetManager::getSingleton().loadSkin("qgui",".png","myResourceGroup");
The SkinSet "qgui" would only be made of .png files. You can use as many skins as you like in your app, I just want the SkinSet to be limited to a particular image extension.
Are there any problems with this?