mrmclovin
17-08-2008 14:25:47
I've been struggling with several problem with the MyGUI library and yet not come any further then to just initialise the object(s) and load a simple layout. This post is about some intresting information i've dug up due some research about what could cause my crashes. For a description of the problem read this thread.
Okey now to my results. I load a .layout which contains:
This will cause a crash of my app. when I load the layout.
The button uses the skin "Button" so let us have a look at the Skin "Button":
core.skin
As you can see one of its BasisSkin element have the type "SimpleText" and that is the intresting part. If i delete the BasisSkin element of type "SimpleText" the app does not crash and Im able to see a widget on my screen.
This crash-phenomenon applies to every widget-type that uses a skin where <BasisSkin type="SimpleText"> occurs.
Im now qurios curious about further possible ways to find the root of this problem? Im pretty sure it now has to do something with SimpleText. Any help?
Thanks in advance!
Okey now to my results. I load a .layout which contains:
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Button" skin="Button" position="10 10 300 26" align="ALIGN_DEFAULT" layer="Main" name="MyFirstButton" >
<Property key="Widget_Caption" value="exit" />
</Widget>
</MyGUI>
This will cause a crash of my app. when I load the layout.
The button uses the skin "Button" so let us have a look at the Skin "Button":
core.skin
<Skin name = "Button" size = "54 26" texture = "core.png">
<Property key="FontName" value = "MyGUI_CoreFont.18" />
<Property key="FontHeight" value = "18" />
<Property key="AlignText" value = "ALIGN_CENTER" />
<Property key="Colour" value = "0 0 0" />
<BasisSkin type="SubSkin" offset = "0 0 20 26" align = "ALIGN_LEFT ALIGN_VSTRETCH">
<State name="disable" offset = "2 2 20 26"/>
<State name="normal" offset = "2 30 20 26"/>
<State name="active" offset = "2 58 20 26"/>
<State name="pressed" offset = "2 86 20 26"/>
<State name="select" offset = "2 114 20 26"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "20 0 20 26" align = "ALIGN_STRETCH">
<State name="disable" offset = "22 2 20 26"/>
<State name="normal" offset = "22 30 20 26"/>
<State name="active" offset = "22 58 20 26"/>
<State name="pressed" offset = "22 86 20 26"/>
<State name="select" offset = "22 114 20 26"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "40 0 14 26" align = "ALIGN_RIGHT ALIGN_VSTRETCH">
<State name="disable" offset = "42 2 14 26"/>
<State name="normal" offset = "42 30 14 26"/>
<State name="active" offset = "42 58 14 26"/>
<State name="pressed" offset = "42 86 14 26"/>
<State name="select" offset = "42 114 14 26"/>
</BasisSkin>
<BasisSkin type="SimpleText" offset = "23 0 28 26" align = "ALIGN_STRETCH">
<State name="disable" colour="0.87 0.87 0.87"/>
<!--State name="normal" colour="0 0 0"/-->
<!--State name="active" colour="2C8AD5"/-->
<!--State name="pressed" colour="0 0 0"/-->
<!--State name="select" colour="2C8AD5"/-->
</BasisSkin>
</Skin>
As you can see one of its BasisSkin element have the type "SimpleText" and that is the intresting part. If i delete the BasisSkin element of type "SimpleText" the app does not crash and Im able to see a widget on my screen.
This crash-phenomenon applies to every widget-type that uses a skin where <BasisSkin type="SimpleText"> occurs.
Im now qurios curious about further possible ways to find the root of this problem? Im pretty sure it now has to do something with SimpleText. Any help?
Thanks in advance!