Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

Commit f23b60e

Browse files
committed
Add visible function
1 parent e2459be commit f23b60e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

ModLoader/ModsMenu.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace ModLoader
88
{
99
public class ModsMenu : MonoBehaviour
1010
{
11+
private ModLoader.Console _console;
1112
// Events
1213
public static event EventHandler OnMainWindowGUI_Start;
1314
public static event EventHandler OnMainWindowGUI_Build;
@@ -54,6 +55,7 @@ public class ModsMenu : MonoBehaviour
5455

5556
public void Start()
5657
{
58+
this._console= ModLoader.Console.root.GetComponent<ModLoader.Console>();
5759
Create_Textures();
5860
}
5961

@@ -62,6 +64,10 @@ public void Start()
6264
/// </summary>
6365
public void OnGUI()
6466
{
67+
if (this._console.ConsoleGui.IsVisible)
68+
{
69+
70+
6571
switch (Helper.currentScene)
6672
{
6773
case scene.Base:
@@ -116,6 +122,7 @@ public void OnGUI()
116122
}
117123
break;
118124
}
125+
}
119126
}
120127

121128
/// <summary>

0 commit comments

Comments
 (0)