* 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 } );
|
self.client.gotoMenuModule( { name : self.menuConfig.next } );
|
||||||
}, this.menuConfig.options.nextTimeout);
|
}, this.menuConfig.options.nextTimeout);
|
||||||
} else {
|
} else {
|
||||||
if(!_.isObject(self.menuConfig.form) && !_.isString(self.menuConfig.prompt) &&
|
var nextAction = function() {
|
||||||
_.isString(self.menuConfig.action))
|
if(!_.isObject(self.menuConfig.form) && !_.isString(self.menuConfig.prompt) &&
|
||||||
{
|
_.isString(self.menuConfig.action))
|
||||||
menuUtil.handleAction(self.client, null, self.menuConfig);
|
{
|
||||||
}
|
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" : {
|
"newUserActive" : {
|
||||||
|
"art" : "SO-CC1.ANS",
|
||||||
|
"options" : { "cls" : true },
|
||||||
|
"action" : "@menu:currentUserStats",
|
||||||
|
"pause" : "end"
|
||||||
|
},
|
||||||
|
"currentUserStats" : {
|
||||||
"art" : "userstats",
|
"art" : "userstats",
|
||||||
//"prompt" : "pause",
|
//"prompt" : "pause",
|
||||||
"options" : {
|
"options" : {
|
||||||
|
|
|
@ -39,8 +39,10 @@
|
||||||
*/
|
*/
|
||||||
},
|
},
|
||||||
"standard" : {
|
"standard" : {
|
||||||
|
// any menu 'pause' will display this, pause for a key, then erase and move on
|
||||||
"pause" : {
|
"pause" : {
|
||||||
"art" : "pause"
|
"art" : "pause"
|
||||||
|
// :TODO: support mci mappings
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"custom" : {
|
"custom" : {
|
||||||
|
|
Loading…
Reference in New Issue