Skip to content

Commit

Permalink
Fixed IsInterfaceVisible not seeing config or exit box in some games
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Oct 23, 2021
1 parent 7c59160 commit e55b928
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions src/Shared.Core/Maker/MakerAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ public static bool IsInterfaceVisible()
return false;

// Check if the loading screen is currently visible
if (GetIsNowLoadingFade())
if (SceneApi.GetIsNowLoadingFade())
return false;

#if KK || KKS || EC
Expand All @@ -489,29 +489,11 @@ public static bool IsInterfaceVisible()

// Check if settings screen, game exit message box or similar are on top of the maker UI
// In KK class maker the AddSceneName is set to CustomScene, but in normal maker it's empty
var addScene = GetAddSceneName();
if (!string.IsNullOrEmpty(addScene) && addScene != "CustomScene")
var addScene = SceneApi.GetAddSceneName();
if (!string.IsNullOrEmpty(addScene) && addScene != "CustomScene" || SceneApi.GetIsOverlap())
return false;

return true;
}

private static string GetAddSceneName()
{
#if HS2 || KKS
return Manager.Scene.AddSceneName;
#else
return Manager.Scene.Instance.AddSceneName;
#endif
}

private static bool GetIsNowLoadingFade()
{
#if HS2 || KKS
return Manager.Scene.IsNowLoadingFade;
#else
return Manager.Scene.Instance.IsNowLoadingFade;
#endif
}
}
}

0 comments on commit e55b928

Please sign in to comment.