Scale element

Scale elements let you add scales onto the screen on which a range of values can be selected. Scales are, by default, radio-button scales, but you can also make the buttons text boxes, or you can make your scale a slider (see the respective settings commands below).

Creation:

[js]newScale(“id”, 5)[/js]

or [js]newScale(“id”, “left button”, ” middle button”, “right button”)[/js]

Example:

[js try=”true”]
newScale(“hunger”, 5)
.settings.before( newText(“left”, “Right now, I am… very hungry “) )
.settings.after( newText(“right”, ” not hungry at all”) )
.print()
.wait()
[/js]

The code above adds a 5-point radio scale to the screen, preceded by the text Right now, I am… very hungry to its left, and followed by the text not hungry at all to its right, and waits for a click on one of its buttons.

Commands

[yadawiki-list category=”NonTest command,Scale element”]

Tests

[yadawiki-list category=”Test command,Scale element”]