andrewfenn
27-03-2009 19:00:28
My first problem is that putting together too many strings makes MyGUI segfault.
The following code works as expected.
However this code below segfaults.
Here is how mStatusText is defined
and here is "status" from my layout..
My next problem is that as you can see above I have set the text colour white however upon loading the layout I have to set the colour in code before it changes.
My last problem is that I also have the following static images defined in my layout..
As you can see I have set the alpha on all three images to be 40, however within my program it is no transparent at all. I haven't tried setting the alpha within my code yet to see if that resolves the problem.
I should also note the the last two problems I am also experiencing when I load up my layout within the layout editor too. I didn't include my full layout, only selected pieces.
Ed: I just updated my copy to the latest version of MyGUI in SVN and I still have all three problems.
The following code works as expected.
mStatusText->setCaption(
Ogre::String("1")+
Ogre::String("2")
);
However this code below segfaults.
mStatusText->setCaption(
Ogre::String("1")+
Ogre::String("2")+
Ogre::String("3")
);
Here is how mStatusText is defined
mStatusText = MyGUI::Gui::getInstance().findWidget<MyGUI::StaticText>("status");
and here is "status" from my layout..
<Widget type="StaticText" skin="StaticText" position="13 15 323 49" layer="Back" name="status">
<Property key="Widget_InheritsAlpha" value="true"/>
<Property key="Widget_Alpha" value="100"/>
<Property key="Text_TextColour" value="1,1,1,1"/>
<Property key="Text_TextAlign" value="Center"/>
<Property key="Text_FontName" value="DejaVuSans.17"/>
<Property key="Text_FontHeight" value="17"/>
</Widget>
My next problem is that as you can see above I have set the text colour white however upon loading the layout I have to set the colour in code before it changes.
My last problem is that I also have the following static images defined in my layout..
<Widget type="StaticImage" skin="StaticImage" position="40 80 30 30" layer="Back">
<Property key="Image_Name" value="dot1"/>
<Property key="Image_Texture" value="dot.zworks.png"/>
<Property key="Widget_Alpha" value="40"/>
<Property key="Widget_InheritsAlpha" value="true"/>
</Widget>
<Widget type="StaticImage" skin="StaticImage" position="260 80 30 30" layer="Back">
<Property key="Image_Name" value="dot3"/>
<Property key="Image_Texture" value="dot.zworks.png"/>
<Property key="Widget_InheritsAlpha" value="true"/>
<Property key="Widget_Alpha" value="40"/>
</Widget>
<Widget type="StaticImage" skin="StaticImage" position="150 77 35 35" layer="Back">
<Property key="Image_Name" value="dot2"/>
<Property key="Image_Texture" value="dot.zworks.png"/>
<Property key="Widget_InheritsAlpha" value="true"/>
<Property key="Widget_Alpha" value="40"/>
</Widget>
As you can see I have set the alpha on all three images to be 40, however within my program it is no transparent at all. I haven't tried setting the alpha within my code yet to see if that resolves the problem.
I should also note the the last two problems I am also experiencing when I load up my layout within the layout editor too. I didn't include my full layout, only selected pieces.
Ed: I just updated my copy to the latest version of MyGUI in SVN and I still have all three problems.