File tree Expand file tree Collapse file tree 5 files changed +23
-1
lines changed
src/org/openpatch/scratch Expand file tree Collapse file tree 5 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ classes
1212docs /en /public /reference
1313docs /en /book /changelog.md
1414
15+ natives
1516
1617# Ignore Gradle project-specific cache directory
1718.gradle
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <projectDescription >
3+ <name >main</name >
4+ <comment />
5+ <projects />
6+ <buildSpec >
7+ <buildCommand >
8+ <name >org.eclipse.jdt.core.javabuilder</name >
9+ <arguments />
10+ </buildCommand >
11+ </buildSpec >
12+ <natures >
13+ <nature >org.eclipse.jdt.core.javanature</nature >
14+ </natures >
15+ </projectDescription >
Original file line number Diff line number Diff line change @@ -1180,6 +1180,10 @@ public void broadcast(String message) {
11801180
11811181 public void whenIReceive (String message ) {}
11821182
1183+ public void stamp () {
1184+ this .stampToBackground ();
1185+ }
1186+
11831187 public void stampToBackground () {
11841188 if (this .costumes .size () > 0 ) {
11851189 var stamp =
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ public class Applet extends PApplet {
3030 public CopyOnWriteArrayList <StageBox > stages = new CopyOnWriteArrayList <>();
3131 public int currentStage = -1 ;
3232
33+ private boolean hasLoaded = false ;
3334 private String loadingText = "" ;
3435
3536 private class StageBox {
@@ -221,6 +222,7 @@ public void loadAssets() {
221222 } catch (IOException | URISyntaxException e ) {
222223 }
223224 }
225+ this .hasLoaded = true ;
224226 }
225227
226228 private float loadingStatus () {
@@ -256,7 +258,7 @@ public void keyEvent(KeyEvent e) {
256258
257259 public void draw () {
258260 int sizeStages = this .stages .size ();
259- if (this .loadingStatus () < 1 ) {
261+ if (! this . hasLoaded || this .loadingStatus () < 1 ) {
260262 this .background (0x222222 );
261263 this .image (this .loading , this .width / 2 , this .height / 2 );
262264 this .textAlign (CENTER );
You can’t perform that action at this time.
0 commit comments