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
@@ -1,5 +1,6 @@
package org.saturnclient.ui;
import org.saturnclient.common.provider.Providers;
import org.saturnclient.ui.components.Sidebar;
import org.saturnclient.ui.elements.ImageTexture;
import org.saturnclient.ui.elements.Panel;
@@ -38,6 +39,9 @@ public abstract class PanelScreen extends SaturnScreen {
@Override
public final void ui() {
// The panels are frosted themselves, so the rest of the game stays clear.
blurBackground = !Providers.saturn.supportsGlass();
panelWidth = Math.min(MAX_WIDTH, width - MARGIN * 2 - Sidebar.WIDTH - GAP);
panelHeight = Math.min(MAX_HEIGHT, height - MARGIN * 2);