2013-07-18 22:56:05 +00:00
|
|
|
var blessed = require('../');
|
2013-07-04 04:15:09 +00:00
|
|
|
|
|
|
|
var screen = blessed.screen({
|
2013-07-28 19:29:07 +00:00
|
|
|
dump: __dirname + '/logs/insert.log'
|
2013-07-04 04:15:09 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
var box = blessed.box({
|
|
|
|
parent: screen,
|
2014-06-17 03:41:28 +00:00
|
|
|
//align: 'center',
|
2015-04-04 06:43:24 +00:00
|
|
|
style: {
|
|
|
|
bg: 'blue'
|
|
|
|
},
|
2013-07-04 04:15:09 +00:00
|
|
|
height: 5,
|
|
|
|
top: 'center',
|
|
|
|
left: 0,
|
2014-06-17 03:41:28 +00:00
|
|
|
width: 12,
|
|
|
|
tags: true,
|
2014-06-26 17:46:41 +00:00
|
|
|
content: '{yellow-fg}line{/yellow-fg}{|}1',
|
2013-07-17 01:19:44 +00:00
|
|
|
//valign: 'middle'
|
2013-07-04 04:15:09 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
screen.render();
|
|
|
|
|
2014-06-26 17:46:41 +00:00
|
|
|
box.insertBottom('{yellow-fg}line{/yellow-fg}{|}2');
|
|
|
|
box.insertTop('{yellow-fg}line{/yellow-fg}{|}0');
|
2013-07-04 04:15:09 +00:00
|
|
|
|
|
|
|
screen.render();
|
|
|
|
|
|
|
|
setTimeout(function() {
|
|
|
|
box.deleteTop();
|
|
|
|
screen.render();
|
|
|
|
}, 2000);
|
|
|
|
|
|
|
|
screen.key('q', function() {
|
|
|
|
process.exit(0);
|
|
|
|
});
|