You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I actually recently started making a ComputerCraft API to make clickable buttons with functions tied to them, i.e. a new way to make buttons.
The only problem is to make it work requires you to wrap all your code into a main() function, then load the API at the very start of the code and run main() and btn.begin() parallel to each other using parallel.waitForAny(main, btn.begin) at the very end so the API can automatically run a function as soon as a button is clicked, without the need for any extra calls to btn.pullEvent() (Passthrough of os.pullEvent() but runs functions if it gets a "mouse_click" event with the X and Y positions being in the button's range) calls. If you choose to not include that at the end, you have to implement some way to call btn.pullEvent() or btn.pullEventRaw() (An exact copy of btn.pullEvent() but with os.pullEventRaw() instead of os.pullEvent()) every so often, or the functions will not be called.
That was a very long explanation.
TL;DR: I made a cool button API for CC that only works if you wrap your code in a function and run it parallel to btn.begin().
The text was updated successfully, but these errors were encountered:
That's pretty cool. I'm pretty active in the CC community as well, mainly on servers though.
Yeah, I make lots of APIs and programs for CC.
I'm currently making a package manager kinda like NPM for CC (CCPM).
I have noticed they seem to be using RECAPTCHA V1 (Although someone got in somehow...) and I can't make an account... 😞
I was actually planning on making a GitHub pages site for CC where you could make posts, but I think I'm just gonna make a CC blog where I'll post the APIs and programs I make.
Welp, see ya around, I'm gonna go make a game engine for CC!
P.S.: I made a pull req. on your LOVE2D button API. I added the feature you mentioned in the README for you.
I actually recently started making a ComputerCraft API to make clickable buttons with functions tied to them, i.e. a new way to make buttons.
The only problem is to make it work requires you to wrap all your code into a
main()
function, then load the API at the very start of the code and runmain()
andbtn.begin()
parallel to each other usingparallel.waitForAny(main, btn.begin)
at the very end so the API can automatically run a function as soon as a button is clicked, without the need for any extra calls tobtn.pullEvent()
(Passthrough ofos.pullEvent()
but runs functions if it gets a"mouse_click"
event with the X and Y positions being in the button's range) calls. If you choose to not include that at the end, you have to implement some way to callbtn.pullEvent()
orbtn.pullEventRaw()
(An exact copy ofbtn.pullEvent()
but withos.pullEventRaw()
instead ofos.pullEvent()
) every so often, or the functions will not be called.That was a very long explanation.
TL;DR: I made a cool button API for CC that only works if you wrap your code in a function and run it parallel to
btn.begin()
.The text was updated successfully, but these errors were encountered: