How to set transparency.

magistr

04-10-2007 23:02:29

I am port 0.96 version.
And I am not understand how to set transparency to Image control.

I have image and I want to set transparency to Image Widget.

kungfoomasta

05-10-2007 00:24:49

Currently there is no convenient method to set the transparency of a widget, although I should add one, its not too difficult.

For a quick hack, you can try something like this, I hope the API is available in v0.9.6:

myImage->getQuad->setColor(Ogre::ColourValue(1,1,1,myAlphaValue));

When I actually go to implement the function, be it "setOpacity" or "setTransparency", I will have to consider inheritting this value from parent. I'll try to add this into next release.

magistr

05-10-2007 09:19:52

hm. I am can't fing getQuad function.
I am download new version vrom svn. This function is present in this version, but I have meny problems with it (all controls are invisible :-( )

How to set transparency in 0.9.6b version (latest release)

kungfoomasta

05-10-2007 16:34:01

All the controls are probably not visible because you are setting your widgets using relative coordinates, and not pixel coordinates. Instead of values like 0.0 - 1.0, you have to use value like x = 0 - [screen resolution width], y = 0 - [screen resolution height]. For example, [0-800],[0-600].

I would have to look at the code from that release to be able to answer that. If you can't get access to the Quad, then it isn't possible.

magistr

06-10-2007 09:19:28

Thanks!