Simple text + window widget question.

badfish

05-05-2011 08:59:10

Hi Folks,

Apologies for the basic question, but I have not been able to answer this for myself and i as yet have little experience with MyGUI.

I am displaying some basic debug information on screen about my applications status as a means to explore MyGUI a little and fiddle with some of its abilities.

I am using a TextBox with some white text set at application run time, but what I would really like to see is a semi transparent window around the text (since I will be using this type of menu/HUD in the completed game). I do not want title bars etc, just a square of size my choosing thats semi transparent. I cant seem to find the correct widget to do this.

Should I be laying two widgets over each other to create the effect?

Could someone please just point me towards the right widgets / usage styles so I can experiment with them.

Many thanks in advance.

Altren

05-05-2011 09:49:18

Create widget with type "Widget" and skin "PanelSkin". And to make panel semi-transparent with non-transparent text you need to use "InheritsAlpha" property to false.

Something like this:
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout" version="3.2.0">
<Widget type="Widget" skin="PanelSkin" position="232 192 296 184">
<Property key="Alpha" value="0.5"/>
<Widget type="TextBox" skin="TextBox" position="68 40 124 60">
<Property key="Caption" value="Text"/>
<Property key="InheritsAlpha" value="false"/>
</Widget>
</Widget>
</MyGUI>
copy this into file and open in LE.

badfish

05-05-2011 10:16:22

Create widget with type "Widget" and skin "PanelSkin". And to make panel semi-transparent with non-transparent text you need to use "InheritsAlpha" property to false.

Something like this:
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout" version="3.2.0">
<Widget type="Widget" skin="PanelSkin" position="232 192 296 184">
<Property key="Alpha" value="0.5"/>
<Widget type="TextBox" skin="TextBox" position="68 40 124 60">
<Property key="Caption" value="Text"/>
<Property key="InheritsAlpha" value="false"/>
</Widget>
</Widget>
</MyGUI>
copy this into file and open in LE.



Ahh i see, many thanks for the info and the quick reply! I'll try that shortly.

badfish

05-05-2011 10:18:46

Yes, worked a treat. Thanks again!