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

GUI API with text input labels and buttons

Started by Elrond1369, 19 December 2013 - 08:50 PM
Elrond1369 #1
Posted 19 December 2013 - 09:50 PM
GUI API with text input labels and buttons

This is the start of a gui api I'm working on. It is design to easily make different inputs that the user can interact with and the event listening is handled by the api.

Here is the function that the api has right now

gui.new(backgroundcolor) --creates a new gui element table and sets the screen background color
gui.label(value, background color, text color, x, y) -- creates a new label. non interactive
gui.button(name, value, background color, text color, x, y) --creates a new button
gui.text(name, value, background color, text color, x, y, length) --creates a new text input
data = gui.listen(name of button to submit on) --starts to listen for events. Returns input data in the form of a table.
Download from github

To do list:
  • Make buttons and labels appear different
  • Add the ability to move the cursor inside the text input
  • Add the ability to tab between text inputs
  • Add submit on enter option
  • Add masked password input
  • Add checkbox
  • Add drop-down selector
Edited on 20 December 2013 - 11:28 AM
TechMasterGeneral #2
Posted 03 January 2014 - 10:36 AM
Very interesting… i may try this