diff --git a/package.json b/package.json index 7763518..4a73f7c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "psychojs", - "version": "2024.4.1", + "version": "2024.1.0", "private": true, "description": "Helps run in-browser neuroscience, psychology, and psychophysics experiments", "license": "MIT", diff --git a/src/core/GUI.js b/src/core/GUI.js index 8a0241f..2a606f4 100644 --- a/src/core/GUI.js +++ b/src/core/GUI.js @@ -187,13 +187,26 @@ export class GUI { atLeastOneIncludedKey = true; - markup += ``; - - // if the field is required: + // deal with field options: + // - if the field is required: + if (key.slice(-4) === "|req") + { + key = `${key.slice(0, -4)}*`; + } if (key.slice(-1) === "*") { self._requiredKeys.push(keyId); } + // - all other new options are currently discarded + // TODO + + // remove the new option extensions: + if (key.slice(-4) === "|req" || key.slice(-4) === "|cfg" || key.slice(-4) === "|fix" || key.slice(-4) === "|opt") + { + key = key.slice(0, -4); + } + + markup += ``; // if value is an array, we create a select drop-down menu: if (Array.isArray(value)) @@ -240,7 +253,6 @@ export class GUI markup += "