* WIP experimental pausing for ANSI/art
This commit is contained in:
parent
5a00d219f8
commit
d5017203ac
15
core/art.js
15
core/art.js
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -363,7 +363,7 @@
|
|||
}
|
||||
},
|
||||
"demoDefaultsDosAnsi" : {
|
||||
"art" : "bw_bc.ans",
|
||||
"art" : "WE-CIZB.ANS",
|
||||
"options" : { "cls" : true }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue