From 87f25e671d0430392aed4d280ab3e25af231084c Mon Sep 17 00:00:00 2001 From: Elia Lazzari Date: Wed, 23 Nov 2022 18:36:04 +0100 Subject: [PATCH] increased version number to a new minor release --- README.md | 27 ++++++++++++++++++++++++++- package.json | 2 +- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4b07233..86309c6 100644 --- a/README.md +++ b/README.md @@ -355,7 +355,6 @@ The button is a control widget that basically do the previous example for you in
  • "relese" when the user cancel
  • -**Example** ```js new Button("btnRun", "Run me!", 10, 3, 21, 18, { @@ -369,6 +368,32 @@ new Button("btnRun", "Run me!", 10, 3, 21, 18, }) ``` +### Progress (since 1.3.0) [New!](docs/ProgressBar.md) +This is a control widget that is used to draw a customizable progress bar. +It can also be used as interactive control (slider) by setting the `interactive` option to `true`. + +```js +const p2Style = { + background: "bgBlack", + borderColor: "yellow", + color: "magenta", + boxed: true, + showTitle: true, + showValue: true, + showPercentage: true, + showMinMax: true, +} +const p2 = new Progress("prog3", 25, 2, 3, 31, p2Style, "precision", "horizontal", true) +p2.setText("Interactive") +p2.on("valueChanged", (value) => { + console.log(`Value changed: ${value}`) +}) +``` + + +**Example** +

    Progress_Interactive

    + In the next versions of the library, more control widgets will be added as Control extensions. ## Popup widgets diff --git a/package.json b/package.json index ef44729..19f02ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "console-gui-tools", - "version": "1.2.1", + "version": "1.3.0", "description": "A simple library to draw option menu, text popup or other widgets and layout on a Node.js console.", "main": "dist/ConsoleGui.js", "typings": "dist/ConsoleGui.d.ts",