mos
20-03-2011 10:12:31
Hi,
I create a simple skin by skineditor and export it to layouteditor.
I used the skin as a button but can not see the caption. I debug into it and find if the button use default skin "button" the simpletext part will call EditText::setFontName, but use the skin "mybutton" never call it, so the mTexture is nullptr and never render.
How to solve it, then?
I create a simple skin by skineditor and export it to layouteditor.
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Resource" version="1.1">
<Resource type="ResourceSkin" name="mybutton" size="18 17" texture="MyGUI_BlueWhiteSkins.png">
<BasisSkin type="SubSkin" offset="0 0 18 17" align="Stretch">
<State name="normal" offset="71 20 18 17"/>
<State name="highlighted" offset="71 39 18 17"/>
<State name="pushed" offset="71 58 18 17"/>
</BasisSkin>
<BasisSkin type="SimpleText" offset="0 0 17 17" align="Stretch">
<State name="normal" colour="0 0 0" shift="0"/>
<State name="highlighted" colour="0 0 0" shift="0"/>
<State name="pushed" colour="0 0 0" shift="0"/>
</BasisSkin>
</Resource>
</MyGUI>
I used the skin as a button but can not see the caption. I debug into it and find if the button use default skin "button" the simpletext part will call EditText::setFontName, but use the skin "mybutton" never call it, so the mTexture is nullptr and never render.
How to solve it, then?