Advertisement
Trotnic

Untitled

Dec 21st, 2021
1,172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.30 KB | None | 0 0
  1. mon=peripherial.wrap("side")
  2. mon.setBackgroundColor(colors.black)
  3. mon.clear()
  4. mon.setBackgroundColor(colors.lime)--or other color
  5. mon.setCursorPos(1,1)
  6. mon.print("This is a button")
  7.  
  8. while true do
  9. event,side,x,y=os.pullEvent("monitor_touch")
  10. if x>0 and x<17 and y==1 then
  11. --do button stuff
  12. end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement