Toribash
Original Post
Rounded Quads!
Here's a nice little function to draw rounded quads for you!
I'm sure that at least some of the scripters out there will find this useful, and it'll make your interfaces a little prettier with a minimum of effort! :3

Here's the attached file in code, for those of you that like to copy/paste.

-- This function will draw a nice rounded quad for you!  I'm sure that you'll be able to make your scripts prettier with this :3
-- The quad is seamless, and works perfectly with transparency. It can't do textures though.
-- Written by Lapsus Antepedis
-- It works just like the normal draw_quad, except that it has a cornerradius variable as well.

function draw_rounded_quad(x, y, width, height, cornerRadius)

	--Top Left Corner
	draw_disk (x + cornerRadius, y + cornerRadius, 0, cornerRadius, 32, 1, -90, -90, 0)
	
	--Main Box
	draw_quad ((x + cornerRadius), y, (width - cornerRadius * 2), height)
	
	--Top Right Corner
	draw_disk (x + (width - cornerRadius), y + cornerRadius, 0, cornerRadius, 32, 1, 180, -90, 0)
	
	--Left Box
	draw_quad (x, (y + cornerRadius), cornerRadius, (height - cornerRadius * 2))
	
	--Right Box
	draw_quad ((x + (width - cornerRadius)), (y + cornerRadius), cornerRadius, (height - cornerRadius * 2))
	
	--Bottom Left Corner
	draw_disk (x + cornerRadius, y + cornerRadius + (height - cornerRadius * 2), 0, cornerRadius, 32, 1, 0, -90, 0)
	
	--Bottom Right Corner
	draw_disk (x + (width - cornerRadius), y + cornerRadius + (height - cornerRadius * 2), 0, cornerRadius, 32, 1, 0, 90, 0)
	
end
Attached Files
RoundedQuad.lua (1.2 KB, 29 views)
<+veb> dude___________________._____________________<hampa> the hosting center decided to raise the price
<+veb> I am to durnk to pu6t in the wriute commmand lol ___<hampa> and we only run irc on this machine which is a bit of a waste
<+veb> and u suxc u cant od it gfro me ______|______._____<Lapsus> How much power is behind the IRC server?
<+veb> ;oml?________________________________________<hampa> it is like delivering pizza using an airplane