Elius94 / console-gui-tools

A simple library to draw option menu or other popup inputs and layout on Node.js console.
MIT License
123 stars 18 forks source link

Elius94/issue13 #15

Closed Elius94 closed 2 years ago

Elius94 commented 2 years ago

Changed the draw screen algorytm:

Animation

This is not solving all the flashing trouble:

To solve this we need to create the screen buffer and then flush to the stdout only once per frame. Actually we do it for each screen layer, so sometimes it's possible to see for an istant what is on the bottom of the current Widget. The difficulty is to manage this keeping the styled strings (chalk) working.