neo-blessed/test/widget-padding.js

29 lines
419 B
JavaScript
Raw Normal View History

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',
width: 22,
height: 10,
padding: 2
2013-07-14 08:48:17 -05:00
});
screen.key('q', function() {
return screen.destroy();
2013-07-14 08:48:17 -05:00
});
screen.render();