mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-25 20:18:25 +02:00
* Support pausing after art display
This commit is contained in:
parent
ff5d568259
commit
9120cc9e18
3 changed files with 23 additions and 5 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue