Frost translucent panels with glass

Panels whose background isn't solid draw the blurred game behind them,
cut to the same rounded rectangle texture as the background, where the
version supports glass. Panel screens then leave the rest of the game
unblurred.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-09-28 20:43:44 +02:00
co-authored by claude
parent 5c0912f0cf
commit 4d9c629eaf
5 changed files with 65 additions and 9 deletions
@@ -46,11 +46,11 @@ public abstract class SaturnScreen {
}
/**
* How much to blur the game behind this screen right now: the client's
* setting, faded in over the screen's first moments.
* How much to blur the game behind this screen and its glass right now: the
* client's setting, faded in over the screen's first moments.
*/
public int getBackgroundBlur() {
if (!blurBackground || start == null) {
public int getBlurRadius() {
if (start == null) {
return 0;
}
@@ -58,6 +58,14 @@ public abstract class SaturnScreen {
return Math.round(Config.backgroundBlur.value * Math.min(elapsed / (float) BLUR_FADE_IN, 1f));
}
/**
* How much to blur the whole game behind this screen right now, or 0 when it
* isn't.
*/
public int getBackgroundBlur() {
return blurBackground ? getBlurRadius() : 0;
}
/**
* The GUI scale setting this screen follows; the menu scale unless the
* screen is another kind.