Advertisement
MagmaLP

Deutsch-Englisch mit Button

Dec 16th, 2020 (edited)
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.loadAPI("col")
  2. col.setBackground(colors.black)
  3.  
  4. local sprache = "englisch"
  5.  
  6. function englisch()
  7.   col.clear()
  8.  
  9.   col.msg(01,"-englisch-")
  10. end
  11.  
  12. function deutsch()
  13.   col.clear()
  14.  
  15.   col.msg(01,"-deutsch--")
  16. end
  17.  
  18. englisch()
  19. while true do
  20.   local event, side, X, Y = os.pullEvent("monitor_touch")
  21.   if X >= 1 and X <=10 and Y >= 1 and Y <= 1 and side == "top" then
  22.     if sprache == "englisch" then
  23.       sprache = "deutsch"
  24.       deutsch()
  25.     else
  26.       sprache = "englisch"
  27.       englisch()
  28.     end
  29.   end
  30. end  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement