Draw.roundbox behind draw.simpletext

Hi fellow coders, im new to lua, and i want to know how to make the roundbox stay behind the text, to make the text stay at the front and the roundbox as the background, i got this code:
draw.RoundedBox(0,170,ScrH()-200+y,215,45,Color(54,54,54,255))

  • Flazh

EDIT: This is solved. I just had to enter the draw.roundbox before the text.

Switch the order you have the code in, so put the text after where you draw the rounded box.

[lua]if CLIENT then
hook.Add(“HUDPaint”, “Gstar_Box”, function()
draw.RoundedBox(0,170,ScrH()-200+y,215,45,Color(54,54,54,255))
draw.DrawText(“Example”, “YourFont”, 0, 0, Color(255,255,255,255), TEXT_ALIGN_CENTER)
end)
end[/lua]

Well, thanks Nookyava :smiley: