-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.cs
36 lines (34 loc) · 1.68 KB
/
Main.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using MelonLoader;
using UnityEngine;
using TMPro;
using UnityEngine.UI;
namespace DarkMode
{
public static class BuildInfo
{
public const string Name = "DarkUI"; // Name of the Mod. (MUST BE SET)
public const string Description = "A DarkUI mod for BricksVR."; // Description for the Mod. (Set as null if none)
public const string Author = "BelugaTheAxolotl#2134"; // Author of the Mod. (MUST BE SET)
public const string Company = null; // Company that made the Mod. (Set as null if none)
public const string Version = "0.1.0"; // Version of the Mod. (MUST BE SET)
public const string DownloadLink = null; // Download Link for the Mod. (Set as null if none)
}
public class UIset : MelonMod
{
public override void OnSceneWasInitialized(int buildindex, string sceneName)
{
GameObject.Find("MenuBoard/Background").GetComponent<Image>().color = new Color(0, 0, 0, 0.75f);
var allOBJ = Resources.FindObjectsOfTypeAll<GameObject>();
for (var e = 0; e < allOBJ.Length; e++)
{
if (!allOBJ[e].GetComponent<Button>()) continue;
if (allOBJ[e].GetComponent<Image>() && allOBJ[e].transform.GetChild(0).GetComponent<TextMeshProUGUI>())
{
allOBJ[e].GetComponent<Image>().color = new Color(0, 0, 0, 0.75f);
allOBJ[e].transform.GetChild(0).GetComponent<TextMeshProUGUI>().color = new Color(0.5755f, 0.5755f, 0.5755f, 1);
allOBJ[e].transform.GetChild(0).GetComponent<TextMeshProUGUI>().faceColor = new Color32(255, 255, 255, 255);
}
}
}
}
}