easyconsoleinterface
v0.1.1
Published
[BETA] This creates console-based interfaces. Supports console packages such as chalk and emoji-list. Update: Patched InvalidInputError.
Downloads
2
Readme
EasyConsoleInterface
This creates console-based interfaces. Supports console packages such as chalk and emoji-list.
Documentation
ClearConsole
Information
Clears the console, making it empty.
Input
None
Example
EasyConsoleInterface.ClearConsole()
CreateGUI
Information
Creates the current GUI interface. It takes in a string for title (can be ascii art) and an array for the commands as well as a callback for once it's done.
Input
Title - What goes at the top of the GUI.
NumColour - The colour of the number(s), e.g. 'blue'
.
TextColour - The colour of the command(s), e.g. 'blueBright'
.
Command(s) - The commands avalible to the user in the GUI.
Command(s) => Name - What will be displayed in the GUI.
Command(s) => Command - The function which will be called.
Command(s) => Parameters - What will be called if triggered.
Callback - A function called once the command has been executed.
Example
EasyConsoleInterface.CreateGUI(
'Example GUI',
'blue',
'blueBright',
[
{"name": "Print Hello!", "command":console.log, "parameters":["Hello", "!"]},
{"name": "Print Hello World!", "command":console.log, "parameters":["Hello", "World", "!"]}
],
() => {
EasyConsoleInterface.ClearConsole();
})