From 528395d102d63cc20cd3fdad105c0fed7097fef7 Mon Sep 17 00:00:00 2001 From: Twirlbug Date: Tue, 4 Jul 2023 19:47:48 -0500 Subject: [PATCH] Fixed issue with the multiplayer ui on small screens not being fully to the right side --- SRMP/Custom UI/MultiplayerUI.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SRMP/Custom UI/MultiplayerUI.cs b/SRMP/Custom UI/MultiplayerUI.cs index 542a9cb..a3940a4 100644 --- a/SRMP/Custom UI/MultiplayerUI.cs +++ b/SRMP/Custom UI/MultiplayerUI.cs @@ -63,6 +63,11 @@ public class MultiplayerUI : SRSingleton { base.Awake(); + //set default ui location width adapting numbers for smaller resolutions + float width = 300; + if (Screen.width / 4 < width) width = Screen.width / 4; + windowRect = new Rect(Screen.width - width - 20, 20, width, 500); + Globals.Username = PlayerPrefs.GetString("SRMP_Username", ""); ipaddress = PlayerPrefs.GetString("SRMP_IP", "localhost"); port = PlayerPrefs.GetString("SRMP_Port", "16500");