* Support pausing after art display

This commit is contained in:
Bryan Ashby 2015-07-22 23:08:08 -06:00
parent ff5d568259
commit 9120cc9e18
3 changed files with 23 additions and 5 deletions

View File

@ -218,11 +218,21 @@ MenuModule.prototype.finishedLoading = function() {
self.client.gotoMenuModule( { name : self.menuConfig.next } );
}, this.menuConfig.options.nextTimeout);
} else {
if(!_.isObject(self.menuConfig.form) && !_.isString(self.menuConfig.prompt) &&
_.isString(self.menuConfig.action))
{
menuUtil.handleAction(self.client, null, self.menuConfig);
}
var nextAction = function() {
if(!_.isObject(self.menuConfig.form) && !_.isString(self.menuConfig.prompt) &&
_.isString(self.menuConfig.action))
{
menuUtil.handleAction(self.client, null, self.menuConfig);
}
};
if('end' === self.menuConfig.pause) {
// :TODO: really need a client.term.pause() that uses the correct art/etc.
self.client.waitForKeyPress(function kp(ch, key) {
nextAction();
});
} else {
nextAction();
}
}
};

View File

@ -192,6 +192,12 @@
}
},
"newUserActive" : {
"art" : "SO-CC1.ANS",
"options" : { "cls" : true },
"action" : "@menu:currentUserStats",
"pause" : "end"
},
"currentUserStats" : {
"art" : "userstats",
//"prompt" : "pause",
"options" : {

View File

@ -39,8 +39,10 @@
*/
},
"standard" : {
// any menu 'pause' will display this, pause for a key, then erase and move on
"pause" : {
"art" : "pause"
// :TODO: support mci mappings
}
},
"custom" : {