Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

znepb-cc/cc-button-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

cc-button-api

A simple button API for ComputerCraft.

Functions

string button.new(int x, int y, int w, int, h, function f[, int m])

Creates a new button at the specified position and the specified size. The f value is the function that will be ran when the button is pressed. By default, m is 1. This can be changed by passing to the 6th argument.

button.remove(string id)

Removes the specified id from the list of buttons. This ID is returned when a button is created.

button.eventLoop()

Checks for when a button is pressed. If you want to have other events in your program (e.g. key events), see button.checkEvents().

button.checkEvents(table e)

Checks for button events. Basically, goes through all buttons and checks if the values in e are inside a button. e should be {os.pullEvent(). If you are only using mouse events from this API in your program, use button.eventLoop()

About

A simple button API for ComputerCraft.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages