From c88dd4c19b0aa17561b25b97475522723aa5497c Mon Sep 17 00:00:00 2001 From: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com> Date: Mon, 20 Jul 2026 15:39:42 +0000 Subject: [PATCH] chore: release v4.28.0 --- .changeset/beginner-friendliness.md | 19 ------------------- pom.xml | 2 +- 2 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 .changeset/beginner-friendliness.md diff --git a/.changeset/beginner-friendliness.md b/.changeset/beginner-friendliness.md deleted file mode 100644 index 8269aa44..00000000 --- a/.changeset/beginner-friendliness.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -type: minor ---- - -Improve beginner-friendliness of the library. - -- **`KeyCode` enum**: Replaced the `static final int` constants class with a proper Java enum. Key constants now have short, readable names (`KeyCode.SPACE`, `KeyCode.UP`, `KeyCode.A`, etc.) with full IDE auto-complete support. The `whenKeyPressed(KeyCode)`, `whenKeyReleased(KeyCode)`, and `isKeyPressed(KeyCode)` methods now accept `KeyCode` directly. - -- **Direction constants**: Added `Sprite.DIRECTION_RIGHT`, `Sprite.DIRECTION_UP`, `Sprite.DIRECTION_LEFT`, and `Sprite.DIRECTION_DOWN` as named constants for `setDirection()`. - -- **`debug()` method**: Added `debug(Object... values)` to `Sprite`, `Stage`, and `Window`. Prints a prefixed message to stdout (e.g. `[CatSprite] x = 100.0`) only when debug mode is enabled (F12 or `setDebug(true)`). - -- **Better asset error messages**: When an image, sound, or font file cannot be loaded, the error now shows the resolved absolute path, checks whether the parent folder exists, lists files in the same folder, and suggests a "did you mean?" correction for case mismatches. - -- **More helpful runtime warnings**: Methods that previously failed silently now print a clear warning with a tip. Affected cases include calling `broadcast()`, layer methods, or visual methods (`setTint`, `setTransparency`, `setHeight`, `setWidth`) before a sprite is on a stage or has a costume; `switchShader()` with an unknown name; `addTimer("default")`; and `setTextureSampling()` with an invalid value. - -- **Suppress Processing noise**: Internal Processing and JOGL messages (window resize notices, missing-file messages, X11 shutdown output) are now filtered from the console so beginners only see output relevant to their code. - -- **Fix debug mode font size**: Enabling debug mode no longer changes the font size of sprites that display text. diff --git a/pom.xml b/pom.xml index 90dd654d..b19cbb86 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.openpatch scratch - 4.27.0 + 4.28.0 jar Scratch for Java