Skip to content

Commit

Permalink
Fix wrong DrawSolidBox color in some games
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Nov 1, 2022
1 parent 1eb85df commit 7964ce0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Shared.Core/Utilities/IMGUIUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ public static class IMGUIUtils
#region Custom skins

internal static bool ColorFilterAffectsImgui =>
#if KK
Studio.StudioAPI.InsideStudio; // todo shouldn't this just be true?
#elif EC
#if KK || EC
true;
#else
false;
Expand Down Expand Up @@ -41,7 +39,7 @@ public static void DrawSolidBox(Rect boxRect)
if (SolidBoxTex == null)
{
var windowBackground = new Texture2D(1, 1, TextureFormat.ARGB32, false);
windowBackground.SetPixel(0, 0, ColorFilterAffectsImgui ? new Color(0.4f, 0.4f, 0.4f) : new Color(0.84f, 0.84f, 0.84f));
windowBackground.SetPixel(0, 0, ColorFilterAffectsImgui ? new Color(0.84f, 0.84f, 0.84f) : new Color(0.4f, 0.4f, 0.4f));
windowBackground.Apply();
SolidBoxTex = windowBackground;
GameObject.DontDestroyOnLoad(windowBackground);
Expand Down

0 comments on commit 7964ce0

Please sign in to comment.