2013-07-14 08:48:17 -05:00
|
|
|
var blessed = require('../')
|
2013-07-28 14:29:07 -05:00
|
|
|
, screen;
|
|
|
|
|
|
|
|
screen = blessed.screen({
|
2015-07-21 19:23:57 -07:00
|
|
|
dump: __dirname + '/logs/padding.log',
|
|
|
|
warnings: true
|
2013-07-28 14:29:07 -05:00
|
|
|
});
|
2013-07-14 08:48:17 -05:00
|
|
|
|
|
|
|
blessed.box({
|
|
|
|
parent: screen,
|
2015-04-03 23:43:24 -07:00
|
|
|
border: 'line',
|
|
|
|
style: {
|
|
|
|
bg: 'red',
|
2013-07-14 08:48:17 -05:00
|
|
|
},
|
|
|
|
content: 'hello world\nhi',
|
|
|
|
align: 'center',
|
|
|
|
left: 'center',
|
|
|
|
top: 'center',
|
2013-07-16 20:07:00 -05:00
|
|
|
width: 22,
|
|
|
|
height: 10,
|
|
|
|
padding: 2
|
2013-07-14 08:48:17 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
screen.key('q', function() {
|
2015-08-07 21:00:31 -07:00
|
|
|
return screen.destroy();
|
2013-07-14 08:48:17 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
screen.render();
|