Scratch for Java

Stage::showVariable()

Shows a variable in a box at the top left of the stage, like a Scratch monitor; its value is read every frame.

this.showVariable("score", () -> this.score);

Examples

View on GitHub

Syntax

Java

.showVariable(name, value)

Scratch

show variable [name v]

Parameters

Name Data Type Description
name String the label
value Supplier<?> gives the value to show

Return

void

showVariable()

Create Shareable URL

Select Sections