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:
@@ -6,7 +6,8 @@ import org.saturnclient.ui.ElementContext;
|
||||
import org.saturnclient.ui.RenderScope;
|
||||
|
||||
/**
|
||||
* The translucent, outlined surface that screens lay their content on.
|
||||
* The translucent, outlined surface that screens lay their content on,
|
||||
* frosted over the game where glass is supported.
|
||||
*/
|
||||
public class Panel extends Element {
|
||||
|
||||
@@ -16,6 +17,11 @@ public class Panel extends Element {
|
||||
}
|
||||
|
||||
public static void drawBackground(RenderScope renderScope, int width, int height) {
|
||||
// Frosted behind a background that isn't solid
|
||||
if (Theme.getPanelBg() >>> 24 < 0xFF) {
|
||||
renderScope.drawGlass(0, 0, width, height, Theme.BG_RADIUS.value);
|
||||
}
|
||||
|
||||
renderScope.drawRoundedRectangle(0, 0, width, height, Theme.BG_RADIUS.value, 1,
|
||||
Theme.getPanelBg(), Theme.getBorder());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user