mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-26 04:28:17 +02:00
* Tons of work with menu/prompts refactoring -- more to come soon
* More work with menu/prompt accets
This commit is contained in:
parent
5faa11664b
commit
bac2f63c1a
21 changed files with 871 additions and 238 deletions
17
core/art.js
17
core/art.js
|
@ -13,6 +13,8 @@ var util = require('util');
|
|||
var ansi = require('./ansi_term.js');
|
||||
var aep = require('./ansi_escape_parser.js');
|
||||
|
||||
var _ = require('lodash');
|
||||
|
||||
exports.getArt = getArt;
|
||||
exports.getArtFromPath = getArtFromPath;
|
||||
exports.display = display;
|
||||
|
@ -395,7 +397,19 @@ function display(options, cb) {
|
|||
var pauseKeys = miscUtil.valueWithDefault(options.pauseKeys, []);
|
||||
var pauseAtTermHeight = miscUtil.valueWithDefault(options.pauseAtTermHeight, false);
|
||||
var mciReplaceChar = miscUtil.valueWithDefault(options.mciReplaceChar, ' ');
|
||||
var iceColors = miscUtil.valueWithDefault(options.iceColors, false);
|
||||
|
||||
var iceColors = options.iceColors;
|
||||
if(_.isUndefined(options.iceColors)) {
|
||||
// detect from SAUCE, if present
|
||||
iceColors = false;
|
||||
if(_.isObject(options.sauce) && _.isNumber(options.sauce.ansiFlags)) {
|
||||
if(options.sauce.ansiFlags & (1 << 0)) {
|
||||
iceColors = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//var iceColors = miscUtil.valueWithDefault(options.iceColors, false);
|
||||
|
||||
// :TODO: support pause/cancel & pause @ termHeight
|
||||
var canceled = false;
|
||||
|
@ -437,6 +451,7 @@ function display(options, cb) {
|
|||
options.client.on('cursor position report', onCPR);
|
||||
|
||||
parser.on('mci', function onMCI(mciCode, id, args) {
|
||||
// :TODO: ensure generatedId's do not conflict with any |id|
|
||||
id = id || generatedId++;
|
||||
var mapItem = mciCode + id;
|
||||
// :TODO: Avoid mutiple [] lookups here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue