This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
mhiekuru's profile picture

GUI API (buttons and stuff!)

Started by mhiekuru, 10 July 2015 - 03:22 PM
mhiekuru #1
Posted 10 July 2015 - 05:22 PM
I was recently having problems making GUIs for my turtle programs and showing info on my energy cells and other misc stuff on my
survival world. So I tried making a GUI API. It's still in very early stage, but most of the stuff I needed is already in it so I decided to share it here in the forum. I just started getting into programming, and I'd love to get your opinion if there's a better way to improve it, if you have the time, or give any suggestions what I should add.

Note:
I'll add documentations about every function when I got the time. but for now here's the API and a sample program
Downloads:

Here's the API:
pastebin get fC7F0LpA gui
Here's a sample program:
0wX7rRY

TODO LIST:
Adjust Text to fill the remaining area of the gui, If the string is too long while keeping text centered
Add Textbox function
Add unrender function
Integrate term.redirect to render (for now use term.redirect before rendering as monitor input is already supported)
Edited on 10 July 2015 - 03:27 PM
lolmaker2002 #2
Posted 19 July 2015 - 11:29 AM
this is a pretty good api, i need to say, ill be using it a lot :D/>