* WIP experimental pausing for ANSI/art

This commit is contained in:
Bryan Ashby 2015-05-03 21:36:53 -06:00
parent 5a00d219f8
commit d5017203ac
3 changed files with 12 additions and 7 deletions

View File

@ -450,18 +450,23 @@ function display(options, cb) {
options.client.on('cursor position report', cprListener);
//options.pause = 'termHeight'; // :TODO: remove!!
var nextTermHeight = options.client.termHeight;
options.pause = 'termHeight'; // :TODO: remove!!
var nextPauseTermHeight = options.client.term.termHeight;
var continous = false;
parser.on('row update', function rowUpdate(row) {
if(row >= nextTermHeight) {
if('termHeight' === options.pause) {
if(row >= nextPauseTermHeight) {
if(!continous && 'termHeight' === options.pause) {
options.client.waitForKeyPress(function kp(k) {
// :TODO: Allow for configurable key(s) here; or none
if('C' === k || 'c' == k) {
continous = true;
}
parser.parse();
});
parser.stop();
}
nextTermHeight *= 2;
nextPauseTermHeight += options.client.term.termHeight;
}
});

View File

@ -63,7 +63,7 @@ function init(configPath, cb) {
function getDefaultPath() {
var base = miscUtil.resolvePath('~/');
if(base) {
return paths.join(base, '.enigmabbs', 'config.json');
return paths.join(base, '.enigma-bbs', 'config.json');
}
}

View File

@ -363,7 +363,7 @@
}
},
"demoDefaultsDosAnsi" : {
"art" : "bw_bc.ans",
"art" : "WE-CIZB.ANS",
"options" : { "cls" : true }
}