• drawing images on screen (ie. hud)
    8 replies, posted
I've been having problems retrieving the proper radius from draw.RoundedBox, and instead I want to draw an image as the rounded container on screen how would I do this? I have the image file but I'm not sure how it'd work or if it's possible at all
[QUOTE=randomGuest;32691403]I have the image file but I'm not sure how it'd work or if it's possible at all[/QUOTE] are you trying to apply the image during a certain event? (health less than 50% or something) and also is it a vft file? that would make it easier to answer this
it's a PNG but I have it as vtf as well and no not during a certain event
so.. wait, just in the corner of the screen or something? im sort of confused what you're asking
position is irrelevant, I just need to draw an image I think it's [url]http://wiki.garrysmod.com/?title=Surface.DrawTexturedRect[/url] what's up with these funky corners? a radius < 3? (2.9) [IMG]http://skiddies.info/drawRect.png[/IMG]
Those corners are probably from your texture, surface.DrawTexturedRect only draws a rectangle with the texture on, nothing else.
[QUOTE=randomGuest;32691643]position is irrelevant, I just need to draw an image I think it's [url]http://wiki.garrysmod.com/?title=Surface.DrawTexturedRect[/url] what's up with these funky corners? a radius < 3? (2.9) [IMG]http://skiddies.info/drawRect.png[/IMG][/QUOTE] If you're trying to round corners always use a power of 2 or else it looks kinda screwed.
[QUOTE=randomGuest;32691643]position is irrelevant, I just need to draw an image I think it's [url]http://wiki.garrysmod.com/?title=Surface.DrawTexturedRect[/url] what's up with these funky corners? a radius < 3? (2.9) [IMG]http://skiddies.info/drawRect.png[/IMG][/QUOTE] only use even numbers.
thanks newbee! I set it to 4 now it works great
Sorry, you need to Log In to post a reply to this thread.