* Support pausing after art display
This commit is contained in:
parent
ff5d568259
commit
9120cc9e18
|
@ -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();
|
||||
}
|
||||
}
|
||||
};
|
|
@ -192,6 +192,12 @@
|
|||
}
|
||||
},
|
||||
"newUserActive" : {
|
||||
"art" : "SO-CC1.ANS",
|
||||
"options" : { "cls" : true },
|
||||
"action" : "@menu:currentUserStats",
|
||||
"pause" : "end"
|
||||
},
|
||||
"currentUserStats" : {
|
||||
"art" : "userstats",
|
||||
//"prompt" : "pause",
|
||||
"options" : {
|
||||
|
|
|
@ -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" : {
|
||||
|
|
Loading…
Reference in New Issue