widget-shadow.js.

This commit is contained in:
Christopher Jeffrey 2015-04-15 10:35:47 -07:00
parent 4ca28d0860
commit 29ca94e719
1 changed files with 22 additions and 0 deletions

View File

@ -51,6 +51,28 @@ var over = blessed.box({
content: '{green-bg}{red-fg}{bold} --Drag Me-- {/}'
});
over.key('left', function() {
over.left -= 2;
screen.render();
});
over.key('up', function() {
over.top -= 1;
screen.render();
});
over.key('right', function() {
over.left += 2;
screen.render();
});
over.key('down', function() {
over.top += 1;
screen.render();
});
over.focus();
screen.key('q', function() {
return process.exit(0);
});