mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-03 08:22:02 +02:00
Getting closer, fixed fse
This commit is contained in:
parent
77e4425df6
commit
b7da0dc82a
6 changed files with 81 additions and 48 deletions
|
@ -171,22 +171,15 @@ exports.getModule = class ShowArtModule extends MenuModule {
|
|||
return callback(err);
|
||||
}
|
||||
const mciData = { menu : artData.mciMap };
|
||||
return callback(null, mciData);
|
||||
if(self.client.term.termHeight > 0 && artData.height > self.client.term.termHeight) {
|
||||
// We must have scrolled, adjust the positioning for pause
|
||||
artData.height = self.client.term.termHeight;
|
||||
}
|
||||
const pausePosition = { row: artData.height + 1, col: 1};
|
||||
return callback(null, mciData, pausePosition);
|
||||
}
|
||||
);
|
||||
},
|
||||
function recordCursorPosition(mciData, callback) {
|
||||
if(!options.pause) {
|
||||
return callback(null, mciData, null); // cursor position not needed
|
||||
}
|
||||
|
||||
self.client.once('cursor position report', pos => {
|
||||
const pausePosition = { row : pos[0], col : 1 };
|
||||
return callback(null, mciData, pausePosition);
|
||||
});
|
||||
|
||||
self.client.term.rawWrite(ANSI.queryPos());
|
||||
},
|
||||
function afterArtDisplayed(mciData, pausePosition, callback) {
|
||||
self.mciReady(mciData, err => {
|
||||
return callback(err, pausePosition);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue