Skip to content

Commit 6296e6c

Browse files
committed
Build-025 Auto-Commit
1 parent 480ae9c commit 6296e6c

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

PawMapLoader/Res/GUI/PawScriptConsole.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ public static void Register()
1515
}
1616

1717
public static bool ConsoleShown = false;
18-
public static Rect ConsoleRect = new Rect(Screen.width*.6f, Screen.height*.04f, Screen.width*.4f, Screen.height*.6f);
18+
public static Rect ConsoleRect;
19+
public static string ConsoleName = "PawScript Console";
20+
public static int ConsoleID = ConsoleName.GetHashCode();
1921
public static List<string> Logs = new List<string>();
2022
public static Vector2 ScrollPos = Vector2.zero;
2123
public static string inptex = "";
@@ -24,6 +26,7 @@ public static void Update()
2426
{
2527
if (Keyboard.current.rightShiftKey.isPressed && Keyboard.current.backquoteKey.wasPressedThisFrame)
2628
{
29+
ConsoleRect = new Rect(Screen.width * .6f, Screen.height * .04f, Screen.width * .4f, Screen.height * .6f);
2730
ConsoleShown = !ConsoleShown;
2831
}
2932
}
@@ -32,12 +35,11 @@ public static void GUIUpdate()
3235
{
3336
if (!ConsoleShown) return;
3437

35-
MelonLogger.Msg("crdraw");
36-
ConsoleRect = UnityEngine.GUI.Window(0, ConsoleRect, (UnityEngine.GUI.WindowFunction)DrawConsole, "PawScript Console");
38+
ConsoleRect = UnityEngine.GUI.Window(ConsoleID, ConsoleRect, (UnityEngine.GUI.WindowFunction)DrawConsole, ConsoleName);
3739
}
3840

3941
public static void DrawConsole(int wid)
40-
{ // another attempt at fixing this damned crash
42+
{ // Days wasted fixing crash: 0
4143
float inputBarHeight = 30f;
4244
float scrollHeight = ConsoleRect.height - inputBarHeight - 25f;
4345

0 commit comments

Comments
 (0)