Stage::getCurrentBackdropName()
Get the name of the current backdrop.
Examples
import org.openpatch.scratch.*;
public class StageGetCurrentBackdropName {
public StageGetCurrentBackdropName() {
Stage myStage = new Stage(600, 240);
myStage.addBackdrop("forest", "assets/background_forest.png");
myStage.addBackdrop("sea", "assets/background_sea.png");
myStage.display("Name: " + myStage.getCurrentBackdropName());
myStage.wait(2000);
myStage.nextBackdrop();
myStage.display("Name: " + myStage.getCurrentBackdropName());
myStage.wait(2000);
myStage.exit();
}
public static void main(String[] args) {
new StageGetCurrentBackdropName();
}
}
Syntax
Java
.getCurrentCostumeName()
Scratch
Return
String