【发布时间】:2021-10-08 19:18:45
【问题描述】:
当我单击屏幕时,停止屏幕会闪烁,然后它会返回到步行屏幕。如何让它一直停留在停止屏幕上,直到我再次单击鼠标?
boolean walk;
String textStop;
String textWalk;
float x; //positions
float y; //positions
void setup() {
size (400,500);
stop = false;
textStop = "STOP!";
textWalk = "WALK!";
}
void draw() {
background(0,255,0);
text(textWalk, x , y);
x = 150;
y = 250;
textSize(40);
}
void mousePressed() {
if (stop);{
background(255,0,0);
text(textStop, x , y);
}
} ```
【问题讨论】:
标签: java processing