mouse api:
mouse.getPos() -- returnes the mouses exact position as a table {x,y}
mouse.testPos(x,y[,x2,y2]) -- if x2 and y2 specified then it will detect the mouse in a square area, returns true or false
mouse.snap(t) -- converts the mouses position to the text grid position
mouse.unsnap(t)
event mouse_right
event mouse_left
combined with text highlighting you could make some verry nice clickable buttons











