Fade

Hello,

How do i make the roundingboxes fade away a little?
Just like this:

https://www.gmodstore.com/scripts/view/1603/sh-ttt-hud

(I don’t want to copy there HUD)

Thank you!

Those boxes aren’t round? Anyway, you have to use

surface.DrawPoly to draw the outer bit without the gradient and

surface.DrawTexturedRect for the bit with the gradient.

You’d draw a gradient material with

surface.DrawTexturedRect.

Expanding on this, GMod comes with some gradient materials. If I’m not wrong, it’s vgui/gradient-u, vgui/gradient-d, vgui/gradient-l and vgui/gradient-r.

Expanding on this expansion, here’s a list:



gui/center_gradient
gui/gradient
gui/gradient_down
gui/gradient_up
vgui/gradh
vgui/gradhr
vgui/gradient-d
vgui/gradient-l
vgui/gradient-r
vgui/gradient-u
vgui/gradient_down
vgui/gradient_up
vgui/gradv
vgui/gradvr


Thank you

[editline]29th August 2017[/editline]

Thanks

[editline]29th August 2017[/editline]

And how would i put outlines to it?

That’s a really good question. I think you have to draw another black poly using DrawPoly behind the first, and then for the gradient part do the same thing except with 2 black gradients. It’s pretty painful, but I can’t think of any other way without using a PNG

I will try that, thank you!