节点祝福库:如何设置单个字符?

也许我从文档中错过了一些东西。 Blessed.js (节点的类似curses的库)带有任何types的box / input / output / mouse工具,看起来很棒,但是我怎样才能在屏幕上设置一个字符呢?

例如,像这样创build了屏幕:

const blessed = require('blessed'); const screen = blessed.screen({ smartCSR: true }); 

我怎样才能用screen显示位置[4,5](第五行的福音字符)中的字符“A”?

谢谢

使用他们的文本部件。 创build一个并将其添加到屏幕上。

 let anA = blessed.text({content:'A', top:4, left:5}) // create a text widget screen.insert(anA) // add it to the screen screen.render(); // render the screen 

我几乎没有使用它,可能有一个更简单的方法。 但是,忘记render是我大部分时间的东西。