PDA

View Full Version : Help needed...


MrJackdaw
12-18-2010, 05:54 PM
I am writing an option dialogue for fading and am using a button with the following code;

Option.OOCMOIcon=Turbine.UI.Button()
Option.OOCMOIcon :SetPosition ( 52,22 )
Option.OOCMOIcon :SetSize ( 32,32 )
Option.OOCMOIcon :SetOpacity ( self.Data.oocmo )
Option.OOCMOIcon :SetParent ( Option.faderbox )
Option.OOCMOIcon :SetBackground ( 0x4100883e )

Why does it always remain at full opacity?

Cearbhall
12-18-2010, 08:06 PM
I think :SetOpacity only works on windows for some reason

Digital_Utopia
12-18-2010, 11:08 PM
I am writing an option dialogue for fading and am using a button with the following code;



Why does it always remain at full opacity?

Because you can't change the opacity of the button itself, you have to wrap it in a Turbine.UI.Window (i.e. set one as the button's parent) and change the opacity of the Window.

MrJackdaw
12-19-2010, 12:05 AM
Damn it... I suspected as much.
It is already bound to a window and I don't want multiple ones - Thanks anyway guys! Back to the drawing board!

Cearbhall
12-22-2010, 04:03 AM
Oh it seems you can change the opacity of other controls
elem:SetStretchMode(3)

of course this can cause other problems like the control no longer being masked to it's parent and seems to ignore the z-order

MrJackdaw
12-22-2010, 09:56 AM
Where did you get the info on setstretchmode? I haven't been able to find any documentation anywhere!