Skip to content

Releases: Elius94/console-gui-tools

1.1.6

21 Apr 10:33
Compare
Choose a tag to compare

What's Changed

Full Changelog: 1.1.5...1.1.6

1.1.5

20 Apr 19:33
6c0530f
Compare
Choose a tag to compare

What's Changed

Full Changelog: 1.1.2...1.1.5

NEW DRAWING ALGORYTM

Animation

Now there's no more flickering in the screen! all the page is prerendered before printing on the console.

Introduced new styling design pattern:

Each page need to be created with the new class

const p = new PageBuilder()

and to add a styled row it's neccessary to call:

p.addRow({ text: `  'm'`, color: 'gray', bold: true }, { text: `       - Select simulation mode`, color: 'white', italic: true })

The arguments of that function is an array of object (function arguments syntax, no []!), so in a row you can add different phrases with different styles.

The styles are converted to the Chalk modificator:

colors:

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
  • blackBright (alias: gray, grey)
  • redBright
  • greenBright
  • yellowBright
  • blueBright
  • magentaBright
  • cyanBright
  • whiteBright

Background colors ('bg')

  • bgBlack
  • bgRed
  • bgGreen
  • bgYellow
  • bgBlue
  • bgMagenta
  • bgCyan
  • bgWhite
  • bgBlackBright (alias: bgGray, bgGrey)
  • bgRedBright
  • bgGreenBright
  • bgYellowBright
  • bgBlueBright
  • bgMagentaBright
  • bgCyanBright
  • bgWhiteBright

Formatters (Each is a prop):

  • italic
  • bold
  • dim
  • underline
  • overline
  • inverse
  • hidden
  • strikethrough

eg:

p.addRow({ text: `TCP messages sent:`, color: 'green', bg: 'bgRed', bold: true, italic: true, underline: true }, { text: ` ${tcpCounter}`, color: 'white' })

And so, we can add the PageBuilder to the home page

GUI.setHomePage(p)

The new Screen class is used internally by the ConsoleManager.

1.1.2

12 Apr 19:05
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 1.1.1...1.1.2

1.1.1

08 Apr 16:29
Compare
Choose a tag to compare
1.1.1 Pre-release
Pre-release