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
Option1 <===
Option2
Option3
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
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