UDBScript: clarified documentation of QueryOptions when using enums

This commit is contained in:
biwa 2021-12-10 20:18:50 +01:00
parent 6cad9218f0
commit 32acb551c3
2 changed files with 2 additions and 0 deletions

View file

@ -42,6 +42,7 @@ namespace CodeImp.DoomBuilder.UDBScript
/// let qo = new QueryOptions();
/// qo.addOption('length', 'Length of the sides', 0, 128);
/// qo.addOption('numsides', 'Number of sides', 0, 5);
/// qo.addOption('direction', 'Direction to go', 11, 1, { 1: 'Up', 2: 'Down' }); // Enumeration
/// qo.query();
///
/// showMessage('You want ' + qo.options.numsides + ' sides with a length of ' + qo.options.length);

View file

@ -8,6 +8,7 @@ Example:
let qo = new QueryOptions();
qo.addOption('length', 'Length of the sides', 0, 128);
qo.addOption('numsides', 'Number of sides', 0, 5);
qo.addOption('direction', 'Direction to go', 11, 1, { 1: 'Up', 2: 'Down' }); // Enumeration
qo.query();
showMessage('You want ' + qo.options.numsides + ' sides with a length of ' + qo.options.length);