There, it's done. Next update this code will let you draw a filled box on the screen by dragging with the left button:
drag=0
mx=0
my=0
function OnMouseLeftDownScreen(x,y)
drag=1
mx=x
my=y
end
function OnMouseLeftUpScreen() -- can include x,y as parameters here if you need them
drag=0
end
function ScreenDraw()
if drag == 1 then
mx2=GetMouseScreenX()
my2=GetMouseScreenY()
DrawBox(9,8,mx,my,mx2,my2,1,1,1,1) -- (texture ID, border, left, top, right, bottom, r, g, b, a)
end
end