christianboutin.com
13-09-2009 00:27:11
I start from the PlayPen example.
Created a new file called uscagui.skinTypes which only contains 1 button definition :
By tracing through the resource manager/parse script method I know that the script is properly loaded, parsed, a my new button type is added to the mDefinitions of the ScriptReader. So far so good. But now how do I "get" it?
Can't use QuickGUI::DescManager::getSingleton().getDefaultButtonDesc(); that'll give me the default button (as it's supposed to).
I thought of using getDesc in such a way :
QuickGUI::ButtonDesc* bd = QuickGUI::DescManager::getSingleton().getDesc<QuickGUI::ButtonDesc>(Ogre::String("usca_bigbutton"));
It says my desc doesn't exist. Tracing through I find that getDesc parses through mUserCreatedDescs, which is empty.
I'm a bit stomped. There appears to be a step I'm missing.
Any help, as always, much appreciated
Created a new file called uscagui.skinTypes which only contains 1 button definition :
Button usca_bigbutton
{
SkinElement default
{
Border_Bottom 2
Border_Left 2
Border_Right 2
Border_Top 2
Texture uscagui.bigbutton.png
TileBackground false
TileBorders true
}
SkinElement down
{
Border_Bottom 2
Border_Left 2
Border_Right 2
Border_Top 2
Texture uscagui.bigbutton.down.png
TileBackground false
TileBorders true
}
SkinElement over
{
Border_Bottom 2
Border_Left 2
Border_Right 2
Border_Top 2
Texture uscagui.bigbutton.over.png
TileBackground false
TileBorders true
}
}
By tracing through the resource manager/parse script method I know that the script is properly loaded, parsed, a my new button type is added to the mDefinitions of the ScriptReader. So far so good. But now how do I "get" it?
Can't use QuickGUI::DescManager::getSingleton().getDefaultButtonDesc(); that'll give me the default button (as it's supposed to).
I thought of using getDesc in such a way :
QuickGUI::ButtonDesc* bd = QuickGUI::DescManager::getSingleton().getDesc<QuickGUI::ButtonDesc>(Ogre::String("usca_bigbutton"));
It says my desc doesn't exist. Tracing through I find that getDesc parses through mUserCreatedDescs, which is empty.
I'm a bit stomped. There appears to be a step I'm missing.
Any help, as always, much appreciated
