mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 14:44:40 +02:00
* Fix short timeFormat
* Pause prompts now support MCI codes using View Controller * View Controller 'noInput' option for read-only/viewable but no interaction * Ability to omit final trailing CRLF's in ANSI's * Move asset.displayArtAsset -> theme.displayThemedAsset
This commit is contained in:
parent
dd478ed6ba
commit
35a99b7e3e
10 changed files with 125 additions and 154 deletions
|
@ -36,11 +36,13 @@ function ANSIEscapeParser(options) {
|
|||
mciReplaceChar : '',
|
||||
termHeight : 25,
|
||||
termWidth : 80,
|
||||
omitTrailingLF : false,
|
||||
});
|
||||
|
||||
this.mciReplaceChar = miscUtil.valueWithDefault(options.mciReplaceChar, '');
|
||||
this.termHeight = miscUtil.valueWithDefault(options.termHeight, 25);
|
||||
this.termWidth = miscUtil.valueWithDefault(options.termWidth, 80);
|
||||
this.omitTrailingLF = miscUtil.valueWithDefault(options.omitTrailingLF, false);
|
||||
|
||||
|
||||
function getArgArray(array) {
|
||||
|
@ -243,7 +245,11 @@ function ANSIEscapeParser(options) {
|
|||
} while(0 !== re.lastIndex);
|
||||
|
||||
if(pos < buffer.length) {
|
||||
parseMCI(buffer.slice(pos));
|
||||
var lastBit = buffer.slice(pos);
|
||||
if(self.omitTrailingLF && '\r\n' === lastBit.slice(-2).toString()) {
|
||||
lastBit = lastBit.slice(pos, -2); // trim off last CRLF
|
||||
}
|
||||
parseMCI(lastBit)
|
||||
}
|
||||
|
||||
self.emit('complete');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue