0.1.1 • Published 3 years ago

easyconsoleinterface v0.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

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();
  })
0.1.0

3 years ago

0.1.1

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago