new(core.gbapp): SHOW MENU BASIC keyword added.
This commit is contained in:
parent
233881b5ff
commit
df42da1bff
2 changed files with 11 additions and 2 deletions
|
@ -479,9 +479,11 @@ export class DialogClass {
|
|||
return [year, month, day].join('/');
|
||||
}
|
||||
}
|
||||
|
||||
public async isAffirmative(step, text) {
|
||||
return text.toLowerCase().match(Messages['pt-BR'].affirmative_sentences); // TODO: Dynamitize.
|
||||
}
|
||||
|
||||
public async exit(step) {
|
||||
await step.endDialog();
|
||||
}
|
||||
|
@ -539,8 +541,8 @@ export class DialogClass {
|
|||
}
|
||||
}
|
||||
|
||||
public async askEmail(step) {
|
||||
return await step.beginDialog('/gbasic-email');
|
||||
public async showMenu(step) {
|
||||
return await step.beginDialog('/menu');
|
||||
}
|
||||
|
||||
public async transfer(step) {
|
||||
|
|
|
@ -257,6 +257,10 @@ export class GBVMService extends GBService {
|
|||
return `exit (step)\n`;
|
||||
});
|
||||
|
||||
code = code.replace(/(show menu)/gi, () => {
|
||||
return `showMenu (step)\n`;
|
||||
});
|
||||
|
||||
code = code.replace(/(talk to)(\s)(.*)/gi, ($0, $1, $2, $3) => {
|
||||
return `sys().talkTo(${$3})\n`;
|
||||
});
|
||||
|
@ -425,6 +429,9 @@ export class GBVMService extends GBService {
|
|||
code = code.replace(/("[^"]*"|'[^']*')|\bexit\b/gi, ($0, $1) => {
|
||||
return $1 === undefined ? 'this.exit' : $1;
|
||||
});
|
||||
code = code.replace(/("[^"]*"|'[^']*')|\bmenu\b/gi, ($0, $1) => {
|
||||
return $1 === undefined ? 'this.menu' : $1;
|
||||
});
|
||||
|
||||
// await insertion.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue