2013-07-18 17:56:05 -05:00
|
|
|
var blessed = require('../');
|
2013-07-03 23:15:09 -05:00
|
|
|
|
|
|
|
var screen = blessed.screen({
|
2013-07-28 14:29:07 -05:00
|
|
|
dump: __dirname + '/logs/insert.log'
|
2013-07-03 23:15:09 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
var box = blessed.box({
|
|
|
|
parent: screen,
|
|
|
|
align: 'center',
|
|
|
|
bg: 'blue',
|
|
|
|
height: 5,
|
|
|
|
top: 'center',
|
|
|
|
left: 0,
|
2013-07-16 20:19:44 -05:00
|
|
|
content: 'line 1',
|
|
|
|
//valign: 'middle'
|
2013-07-03 23:15:09 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
screen.render();
|
|
|
|
|
|
|
|
box.insertBottom('line 2');
|
|
|
|
box.insertTop('line 0');
|
|
|
|
|
|
|
|
screen.render();
|
|
|
|
|
|
|
|
setTimeout(function() {
|
|
|
|
box.deleteTop();
|
|
|
|
screen.render();
|
|
|
|
}, 2000);
|
|
|
|
|
|
|
|
screen.key('q', function() {
|
|
|
|
process.exit(0);
|
|
|
|
});
|