Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Commit

Permalink
1.1 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Arion-Kun authored and Arion-Kun committed Oct 18, 2020
1 parent af0b042 commit bfd0c94
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 23 deletions.
11 changes: 0 additions & 11 deletions TogglePostProcessing/Custom/RubyButtonAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,6 @@ public class QuickMenuStuff
// Internal cache of the QuickMenu
private static QuickMenu quickmenuInstance;

// Internal cache of the VRCUiManager
private static VRCUiManager vrcuimInstance;



Expand Down Expand Up @@ -490,15 +488,6 @@ public static QuickMenu GetQuickMenuInstance()
}
return quickmenuInstance;
}
// Fetch the VRCUiManager instance
public static VRCUiManager GetVRCUiMInstance()
{
if (vrcuimInstance == null)
{
vrcuimInstance = VRCUiManager.field_Protected_Static_VRCUiManager_0;
}
return vrcuimInstance;
}

// Cache the FieldInfo for getting the current page. Hope to god this works!
private static FieldInfo currentPageGetter;
Expand Down
4 changes: 2 additions & 2 deletions TogglePostProcessing/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

[assembly: Guid("d3359f93-f373-4e70-9788-2e6b95f667ed")]

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion(BuildInfo.Version)]
[assembly: AssemblyFileVersion(BuildInfo.Version)]

[assembly: MelonInfo(typeof(TogglePostProcessing.TogglePostProcessing), BuildInfo.Name, BuildInfo.Version, BuildInfo.Author, BuildInfo.DownloadLink)]
[assembly: MelonGame("VRChat", "VRChat")]
28 changes: 18 additions & 10 deletions TogglePostProcessing/TogglePostProcessing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static class BuildInfo

public const string Name = "TogglePostProcessing";

public const string Version = "1.0.4 Build 2";
public const string Version = "1.1.0";

}
public class TogglePostProcessing : MelonMod
Expand All @@ -37,7 +37,7 @@ public override void OnApplicationStart()
MelonPrefs.RegisterBool("TogglePostProcessing", "DisablePostProcessing", false, "Disable Post Processing");
//QM Stuff
MelonPrefs.RegisterBool("TogglePostProcessing", "QMToggle", true, "QuickMenu Toggle Button");
#if OnePointOne
#if TwoPointZero
MelonPrefs.RegisterFloat("TigglePostProcessing", "NightMode1", 0, "Night Mode - 1");
MelonPrefs.RegisterFloat("TigglePostProcessing", "NightMode2", 0, "Night Mode - 2");
MelonPrefs.RegisterFloat("TogglePostProcessing", "NightModeCustomLevel", 0, "Night Mode - Custom: Darkness Level");
Expand All @@ -63,7 +63,7 @@ public override void OnLevelWasLoaded(int level)
GrabWorldVolumes();
GetPrefs();
ToggleMethod(ToggleHandler);
#if OnePointOne
#if TwoPointZero
NightMode.ApplyNightMode();
Bloom.ApplyBloom();
#endif
Expand All @@ -86,7 +86,7 @@ public override void OnModSettingsApplied()
TogglePostProcessingQM.setActive(QMToggle);
TogglePostProcessingQM.setToggleState(!ToggleHandler);
#endif
#if OnePointOne
#if TwoPointZero
NightMode.ApplyNightMode();
Bloom.ApplyBloom();
#endif
Expand Down Expand Up @@ -119,7 +119,7 @@ public override void VRChat_OnUiManagerInit()
GetPrefs();
}
ToggleMethod(ToggleHandler);
}), "Toggle Post Processing", null, null, null);
}), "Toggle Post Processing");
Arion.SetSizeButtonfor(TogglePostProcessingQM.btnOff, 2.5f, 1.51f);
Arion.SetSizeButtonfor(TogglePostProcessingQM.btnOn, 2.5f, 1.51f);
Arion.SetSizeButtonfor(TogglePostProcessingQM.getGameObject(), 1.9f, 1.38f);
Expand All @@ -140,7 +140,7 @@ public void GetPrefs()
{
ToggleHandler = MelonPrefs.GetBool("TogglePostProcessing", "DisablePostProcessing");
QMToggle = MelonPrefs.GetBool("TogglePostProcessing", "QMToggle");
#if OnePointOne
#if TwoPointZero
NightMode.NightMode1Bool = MelonPrefs.GetBool("TogglePostProcessing", "NightMode1");
NightMode.NightMode2Bool = MelonPrefs.GetBool("TogglePostProcessing", "NightMode2");
NightMode.NightMode3Bool = MelonPrefs.GetBool("TogglePostProcessing", "NightModeCustom");
Expand All @@ -154,7 +154,9 @@ public void GetPrefs()
#endif
}
catch (Exception e)
{ MelonLogger.LogError("GetPrefs Error: " + e); }
{
MelonLogger.LogError($"GetPrefs Error: {e}");
}

}
private static void GrabWorldVolumes() //Credits to Psychloor for Method
Expand All @@ -168,7 +170,9 @@ public void GetPrefs()
}
}
catch (Exception e)
{ MelonLogger.LogError("GrabWorldVolumes Error: " + e); }
{
MelonLogger.LogError($"GrabWorldVolumes Error: {e}");
}

}
private static void Reset() //Credits to Psychloor for Method
Expand All @@ -184,7 +188,9 @@ public void GetPrefs()
}
}
catch (Exception e)
{ MelonLogger.LogError("Reset Error: " + e); }
{
MelonLogger.LogError($"Reset Error: {e}");
}
}
private static void ToggleMethod(bool disable)
{
Expand All @@ -209,7 +215,9 @@ private static void ToggleMethod(bool disable)
}
}
catch (Exception e)
{ MelonLogger.LogError("ToggleMethod Error: " + e); }
{
MelonLogger.LogError($"ToggleMethod Error: {e}");
}
}
private static void DisablePostProcessingBool(bool value)
{
Expand Down

0 comments on commit bfd0c94

Please sign in to comment.