• surface.SetDrawColor - textured rect
    5 replies, posted
Hello, my surface.SetDrawColor doesn't work on my textured rect The code: [LUA] surface.SetDrawColor(Color(20,25,211,50)) surface.SetTexture(surface.GetTextureID(territory.text)) surface.DrawTexturedRect(ScrW()/2 + surface.GetTextSize(territory.name)/2,ScrH()/2,96,96) [/LUA] Thank you
I THINK the material you're using needs to have $color set in it's .vmt file for SetDrawColor to work on it.
Your material needs to have $vertexcolor set to 1
Thank you [editline]6th August 2012[/editline] Should it be VertexlitGeneric then btw?
I'm pretty sure it should be UnlitGeneric, especially if its on a hud. [editline]6th August 2012[/editline] (Otherwise it'll be black, i think)
It works, thank you
Sorry, you need to Log In to post a reply to this thread.