Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --loop de eventos
- while run do
- event, button, x, y = os.pullEvent()
- if event == "mouse_click" and ms == 0 and button == 1 and x <= 7 and y == 1 then
- sub_menu()
- ms = 1
- elseif event == "mouse_click" and ms == 1 and button == 1 and x <= 7 and y == 1 then
- ms = 0
- sub_menu_off()
- elseif event == "mouse_click" and ms == 1 and button == 1 and x <= 7 and y == 2 then
- os.shutdown()
- elseif event == "mouse_click" and ms == 1 and button == 1 and x <= 7 and y == 3 then
- clear()
- run = false
- elseif event == "mouse_click" and ms == 1 and button == 1 and x <= 7 and y == 4 then
- turtle()
- elseif event == "mouse_click" and ms == 1 and button == 1 and x <= 7 and y == 5 then
- paint()
- end
- if event == "mouse_click" and onclick == 0 and button == 2 and x >=1 and y >= 2 then
- onclick = 1
- mouse_button_left()
- posx = x
- posy = y
- elseif event == "mouse_click" and onclick == 1 and button == 2 then
- onclick = 0
- backsys()
- menu()
- end
- if event == "mouse_click" and onclick == 1 and button == 1 and x >= posx and x <= (posx+11) and y == posy then
- os.shutdown()
- end
- if event == "mouse_click" and onclick == 1 and button == 1 and x >= posx and x <= (posx+11) and y == (posy+1) then
- clear()
- run = false
- end
- if event == "mouse_click" and onclick == 1 and button == 1 and x >= posx and x <= (posx+11) and y == (posy+2) then
- turtle()
- end
- if event == "mouse_click" and onclick == 1 and button == 1 and x >= posx and x <= (posx+11) and y == (posy+3) then
- paint()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement