Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function New(xx, yy, text, func, m, textcolor, textbgcolor)
- m.setCursorPos(xx, yy)
- m.setBackgroundColor(textbgcolor)
- m.setTextColor(textcolor)
- m.write(text)
- m.setBackgroundColor(colors.black)
- local Event = {os.pullEvent()}
- if Event[1] == "monitor_touch" then
- x = Event[3]
- y = Event[4]
- if x > xx - 1 and x < xx + string.len(text) and y == yy then
- func(text)
- end
- end
- end
Add Comment
Please, Sign In to add comment