From ddfd5c36a5e7be2db54bef8b6eec2330cb35586b Mon Sep 17 00:00:00 2001 From: Dev Date: Tue, 18 Jun 2024 20:19:31 +0100 Subject: [PATCH] Adjusted window draw logic --- project/SPT.Custom/Utils/BundleUtils.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/project/SPT.Custom/Utils/BundleUtils.cs b/project/SPT.Custom/Utils/BundleUtils.cs index b26bfc6..3966eff 100644 --- a/project/SPT.Custom/Utils/BundleUtils.cs +++ b/project/SPT.Custom/Utils/BundleUtils.cs @@ -45,7 +45,16 @@ namespace SPT.Custom.Utils GUI.skin.window.alignment = TextAnchor.MiddleCenter; GUI.skin.window.normal.background = bgTexture; GUI.backgroundColor = Color.black; - GUI.Window(0, new Rect((Screen.width / 2) - 200, (Screen.height / 2) + 200, 500, 80), DrawWindow, "Bundle Loading"); + + int nWindowWidth = 500; + int nWindowHeight = 80; + GUI.Window(0, + new Rect((Screen.width / 2) - (nWindowWidth / 2), + (Screen.height / 2) - (nWindowHeight / 2), + nWindowWidth, + nWindowHeight), + DrawWindow, + "Bundle Loading"); } private void DrawWindow(int windowId)