-
Notifications
You must be signed in to change notification settings - Fork 18
VisualStage Widget v7
- status : complete
- version : 7.x
The VisualStage displays the name of previous, current, and next stage.
The name of a step is the value of the step property name
, or if not found the
id
of the step.
-
displayMode: how the step names are displayed: 'inline' or 'table'. Default: 'inline'.
-
current: if TRUE, the name of the current step is displayed. Default: TRUE.
-
next: if TRUE, the name of the next step is displayed. Default: TRUE.
-
previous: if TRUE, the name of the previous step is displayed. Default: TRUE.
-
order: the order in which current, next, and previous step names are displayed. Default: [ 'current', 'next', 'previous' ] for displayMode 'table', and [ 'previous', 'current', 'next' ] for displayMode 'inline'.
-
capitalize: If TRUE, the name of the step is capitalize (applies to every word in the step name). Default: TRUE.
-
replaceUnderscore: If TRUE, underscores in the name of the step are replaced with spaces. Default: TRUE. (from v7.10.1+)
-
addRound: If TRUE, round number is appended after the name of the step in repeat stages. Default: TRUE. (v7)
-
preprocess: An optional callback transforming the name of the step before displaying it. It is applied after the round count is added. Example:
function preprocess(name, mod, round) { // name is the name of the step. // mod may be 'current', 'previous', 'next'. // round is the step round or undefined. return name + ' (tutorial)'; }
- updateDisplay(): updates the display.
- getStepName(gameStage, curStage, mod): returns the name of the step, including the round number.
- STEP_CALLBACK_EXECUTED: updates the display.
// Creates and append a new VisualStage widget.
var root = W.getHeader();
var options = {
rounds: true,
previous: false
};
var vs = node.widgets.append('VisualStage', root, options);
Go back to the wiki Home.
Copyright (C) 2021 Stefano Balietti
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.