Hello, im trying to draw a healthbar under my .png image but the bar is always above it.
I've tried these two orders:
[CODE]
local mat = Material("materials/medwars/hud/bar.png")
surface.SetMaterial(mat)
surface.SetDrawColor(Color(255,255,255,255))
surface.DrawTexturedRect(10, ScrH() -32, 260, 20)
draw.RoundedBox(0, 20, ScrH()-27, math.Clamp(client:Health(),0,100)*2.4,10, Color(150,0,0,255))
[/CODE]
[CODE]
draw.RoundedBox(0, 20, ScrH()-27, math.Clamp(client:Health(),0,100)*2.4,10, Color(150,0,0,255))
local mat = Material("materials/medwars/hud/bar.png")
surface.SetMaterial(mat)
surface.SetDrawColor(Color(255,255,255,255))
surface.DrawTexturedRect(10, ScrH() -32, 260, 20)
[/CODE]
Is there something im not doing?
Everything that is lower will be drawn over previous stuff. So the second method should work. Show a screenshot of what's happening.
Oh, it is just the way im seeing it, I made it wider than the bar itself and you were right, sorry for wasting your time.
[url]http://puu.sh/86d7H.jpg[/url]
Yeah, im going to redo the bar as it is very lq.
The bar is being drawn properly, under the png. The issue is that the height is too tall. Reduce it by around 2 pixels.
Sorry, you need to Log In to post a reply to this thread.