SHOW:
|
|
- or go back to the newest paste.
1 | - | --requires button API |
1 | + | --requires button API pastebin: fuFAH9kZ |
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") |