Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Source/IMaterialAcrylicPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,13 @@ namespace Celeste.Mod.MicroblocksQolUtils;

internal interface IMaterialAcrylicPage {
bool SuppressNormalRender { get; set; }

/// <summary>
/// False while a foreground popup (string editor, key binding config) owns the screen:
/// the acrylic path renders the whole scene into a blurred backdrop, which would swallow
/// the popup. Falling back to the normal render keeps the popup on top.
/// </summary>
bool AllowsAcrylic { get; }

void RenderMaterialContent(bool acrylicActive);
}
1 change: 1 addition & 0 deletions Source/MaterialAcrylicRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ private static void RenderCore(On.Monocle.Engine.orig_RenderCore orig, Engine se
if (rendering
|| failed
|| page is null
|| !page.AllowsAcrylic
|| !settings.MaterialAcrylicBackground
|| Engine.Scene is not Scene) {
orig(self);
Expand Down
2 changes: 2 additions & 0 deletions Source/MaterialChapterSelect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public sealed class MaterialChapterSelect : Oui, IMaterialAcrylicPage {

public bool SuppressNormalRender { get; set; }

public bool AllowsAcrylic => true;

internal static MaterialChapterSelect? ActivePage {
get {
if (Engine.Scene is not Overworld overworld) return null;
Expand Down
Loading