Advertisement
Guest User

btest

a guest
Sep 16th, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. --requires button API
  2.  
  3. --erase all buttons and clear the screen
  4. button.monDefault()
  5. --define the button with label: "test", that displays the text: testing, x: 5, y:5, text color: white, background color: red, and has a border
  6. button.newButton("test","testing",5,5,colors.white,colors.red,true)
  7. --draw the button with label "test", "all" can also be used to draw all the buttons
  8. button.drawButton("test")
  9. --wait for a button to be clicked then print the label or print: "timed out" when 10 seconds pass
  10. print(button.getClick(10))
  11. --remove and erase the button with the label "test", "all" can be used here as well
  12. button.eraseButton("test")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement