* 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:
Bryan Ashby 2015-07-25 16:10:12 -06:00
parent dd478ed6ba
commit 35a99b7e3e
10 changed files with 125 additions and 154 deletions

View file

@ -11,7 +11,6 @@ exports.parseAsset = parseAsset;
exports.getArtAsset = getArtAsset;
exports.resolveConfigAsset = resolveConfigAsset;
exports.getViewPropertyAsset = getViewPropertyAsset;
exports.displayArtAsset = displayArtAsset;
var ALL_ASSETS = [
'art',
@ -85,47 +84,3 @@ function getViewPropertyAsset(src) {
return parseAsset(src);
};
function displayArtAsset(assetSpec, client, options, cb) {
assert(_.isObject(client));
// options are... optional
if(3 === arguments.length) {
cb = options;
options = {};
}
var artAsset = getArtAsset(assetSpec);
if(!artAsset) {
cb(new Error('Asset not found: ' + assetSpec));
return;
}
var dispOpts = {
name : artAsset.asset,
client : client,
font : options.font,
};
switch(artAsset.type) {
case 'art' :
theme.displayThemeArt(dispOpts, function displayed(err, artData) {
cb(err, err ? null : { mciMap : artData.mciMap, height : artData.extraInfo.height } );
});
break;
case 'method' :
// :TODO: fetch & render via method
break;
case 'inline ' :
// :TODO: think about this more in relation to themes, etc. How can this come
// from a theme (with override from menu.json) ???
// look @ client.currentTheme.inlineArt[name] -> menu/prompt[name]
break;
default :
cb(new Error('Unsupported art asset type: ' + artAsset.type));
break;
}
}