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

GuiApi EZProductions

Started by ENET, 05 March 2012 - 12:58 AM
ENET #1
Posted 05 March 2012 - 01:58 AM
This is a WIP, but this is the post I will add it to when complete.
Please list more ideas on what it needs!
So far it has….

+ Terminate Protection
+ ASCII Image Capabilities
+ Left, Middle, Right text Alignment for Text output
+ WaitForKeyPress -> Can specify a specific key or nil for any key
+ List Selection
+ GetKey function to get the key id of a key with name(getKey('Enter')->28)

Numerical and Arrow; Numerical only allows for 10 options no more
EDIT: Arrow selection list now can hold more than what is viewable and the user can scroll down the list and make a selection. Tested upto 45 options and scrolled top-bottom and it worked.

gui.getSelection = function(list, title, selection, selector, pos)

EXAMPLE

=== Title ===

Option1 <===
Option2
Option3

=== Title ===

0: Option1
1: Option2
3: Option3


NOTE: waitForKeyPress function accepts input for alot of keys as their actual name. List so far:
['Enter'] = 28;
['Delete'] = 211;
['Up'] = 200;
['Down'] = 208;
['Left'] = 203;
['Right'] = 205;
['Back'] = 14;
['Space'] = 57;
['PgUp'] = 201;
['PgDn'] = 209;
['End'] = 207;
['Home'] = 199;
['~'] = 41;
['Shift'] = 42;
['LCtrl'] = 29;
['RCtrl'] = 157;

So if you say….
gui.waitForKeyPress(28) or gui.waitForKeyPress('Enter'); eitherway it will say
Press Enter to Continue
ENET #2
Posted 06 March 2012 - 01:52 AM
New feature:
+ MultiSelection
It is the same as a selection list, but instead you press the right key to check/uncheck the selection then after all selections are made, press enter and it returns a table of the selections.(Shows a check next to selected items… Check and Arrow can be set in the function header, so you can define what they look like)
ENET #3
Posted 09 March 2012 - 04:31 PM
Get the current release here!