Helpe creating Transparant Gui and slider
by Nic Biondi · in Torque Game Engine · 11/19/2006 (8:45 pm) · 4 replies
Good Day kids,
I am trying to create a transpacancy slider in my gui in order to open up the screen in my game. Where is the alpha functions for the gui elements? I can't seem to find any good references to the gui functions in general, other that the gui datamembers. Anyone seen this?
Thanks a bunch!
I am trying to create a transpacancy slider in my gui in order to open up the screen in my game. Where is the alpha functions for the gui elements? I can't seem to find any good references to the gui functions in general, other that the gui datamembers. Anyone seen this?
Thanks a bunch!
#2
11/20/2006 (11:16 am)
It's a png, but no it's not transparant. I know how to add alpha maps to the image themselves.. what I was hoping to do was to add a "slider" that allowed the user to have some control over how visible the gui was. Ideally the transparancy would be inhereted by the children on the gui stack making a nice transition. I know I could do this by using a slider gui componant.. and changing the alpha value on an image somewhere in my game.. but is there anything to control the alpha values of a gui componant.. like the "guicontrol" and such?
#3
I believe it would be fairly straight forward to add this functionality, but would involve considerable work -- to do this right, one would need to start with guiControl and then fix every other control as well. Sounds like a fun weekend to me... =P
11/20/2006 (3:08 pm)
There is no per-control alpha. Alpha can only be specified for a control's colors (e.g. fill color) or via a bitmap's alpha channel.I believe it would be fairly straight forward to add this functionality, but would involve considerable work -- to do this right, one would need to start with guiControl and then fix every other control as well. Sounds like a fun weekend to me... =P
#4
Can't you set a bitmap for the control as a background? if so.. maybe I could access the alpha chanel for that bitmap on the guiControl background and make it fade in and out on a slider? I guess having the children inheret the alpha channel isn't too important since I could just maintain a list of the children and set their alphas at the same time...
My question is:
If I set an image for a guiControl background, can I access that image's alpha channel making the thign fade?
thank
-nic
11/20/2006 (3:20 pm)
Hahhah, fun to me is getting the gui alpha channels working.. so I agree with you. However I am not yet really comfortable with the TGE/B workflow yet and don't know if I want to bite into it just yet.Can't you set a bitmap for the control as a background? if so.. maybe I could access the alpha chanel for that bitmap on the guiControl background and make it fade in and out on a slider? I guess having the children inheret the alpha channel isn't too important since I could just maintain a list of the children and set their alphas at the same time...
My question is:
If I set an image for a guiControl background, can I access that image's alpha channel making the thign fade?
thank
-nic
Torque 3D Owner mb