Hi, I'm working on a hud for my mod and I am having a lot of trouble
trying to get the elements to fade out. I am using textures to create
the hud which is working very well. They the alpha masks in their
textures just fine, what they refuse to do is allow me to change the
overall alpha in code.

This is how I am using the textures.

///////////////////////////////

//Initialisation
int m_nTexture;
m_nTexture = vgui::surface()->CreateNewTextureID();
vgui::surface()->DrawSetTextureFile(m_nTexture,
"vgui/hud/texturename", true, false );


//Paint()
vgui::surface()->DrawSetColor(GetFgColor());
vgui::surface()->DrawSetTexture( m_nTexture );
vgui::surface()->DrawTexturedRect( x, y, x2, y2 );

/////////////////////////////// 

I have tried the following methods to fade the textures out with no luck:
SetAlpha( alpha );
vgui::surface()->DrawSetAlphaMultiplier( alpha_multiplier );
vgui::surface()->DrawSetColor( 255, 255, 255, alpha );



Does anyone here have a suggestion on how I can get the textures to
fade out properly? All that I've been able to do is get the text to
fade out with no effect on the textures.

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to