Posted 07 July 2013 - 12:36 PM
EasyButton API by TheGamerOfAction
Current version: 1.0
What is it?
EasyButton is an API that I created because many
other Button APIs out there are a bit complex to use.
With this, is becomes a whole lot easier.
I designed it to be 'Just a button API'. Basically, this only creates buttons, it dosen't draw them.
How do I use it?
Commands:
- easybutton.createButtonField(<x pos>, <y pos>, <x end pos>, <y end pos>, <name>) - Creates a button field
- easybutton.removeButton(<name>) - Removes a button field. Useful for drop down menus, ect.
- easybutton.waitForClicks() - Yields the program, and waits for the user to click a button. When a button is clicked, it will emit the event "button_click" with the parameters <name of button> and <mouse button used>. Best used with coroutines.
- button_click - fired when a user clicks a button (after easybutton.waitForClicks() is called)
Type into your terminal:
pastebin get YivGRJyj easybutton
or click hereNOTE: This is the first program (or API, for that matter) I have released
Hope you enjoy, you are free to use it in your programs, and credit is always good to give!