function roundedRectangle(x, y, w, h, borderColor, bgColor, postGUI)
if (x and y and w and h) then
if (not borderColor) then
borderColor = tocolor(0, 0, 0, 200);
end
if (not bgColor) then
bgColor = borderColor;
end
--> Background
dxDrawRectangle(x, y, w, h, bgColor, postGUI);
--> Border
dxDrawRectangle(x + 2, y - 1, w - 4, 1, borderColor, postGUI); -- top
dxDrawRectangle(x + 2, y + h, w - 4, 1, borderColor, postGUI); -- bottom
dxDrawRectangle(x - 1, y + 2, 1, h - 4, borderColor, postGUI); -- left
dxDrawRectangle(x + w, y + 2, 1, h - 4, borderColor, postGUI); -- right
end
end