From 3175938fe7136c1706f104bbc8ef57680e5dd8ca Mon Sep 17 00:00:00 2001 From: Jannify <23176718+Jannify@users.noreply.github.com> Date: Fri, 15 Nov 2024 20:18:01 +0100 Subject: [PATCH] WIP --- .../Gui/MainMenu/ServersList/MainMenuCreateServerPanel.cs | 4 ++-- .../Gui/MainMenu/ServersList/MainMenuServerListPanel.cs | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NitroxClient/MonoBehaviours/Gui/MainMenu/ServersList/MainMenuCreateServerPanel.cs b/NitroxClient/MonoBehaviours/Gui/MainMenu/ServersList/MainMenuCreateServerPanel.cs index e816f50b5..a95649d25 100644 --- a/NitroxClient/MonoBehaviours/Gui/MainMenu/ServersList/MainMenuCreateServerPanel.cs +++ b/NitroxClient/MonoBehaviours/Gui/MainMenu/ServersList/MainMenuCreateServerPanel.cs @@ -196,9 +196,10 @@ public void SelectItem(object item) { selectedInputField.Select(); } - else + else // Button { selectedItem.transform.GetChild(0).GetComponent().sprite = MainMenuServerListPanel.SelectedSprite; + selectedItem.GetComponentInChildren().makeTextBlack(); } if (!EventSystem.current.alreadySelecting) @@ -206,7 +207,6 @@ public void SelectItem(object item) EventSystem.current.SetSelectedGameObject(selectedItem); } - selectedItem.GetComponentInChildren().makeTextBlack(); RuntimeManager.PlayOneShot(MainMenuServerListPanel.HoverSound.path); } diff --git a/NitroxClient/MonoBehaviours/Gui/MainMenu/ServersList/MainMenuServerListPanel.cs b/NitroxClient/MonoBehaviours/Gui/MainMenu/ServersList/MainMenuServerListPanel.cs index cee883eb3..a5ffec863 100644 --- a/NitroxClient/MonoBehaviours/Gui/MainMenu/ServersList/MainMenuServerListPanel.cs +++ b/NitroxClient/MonoBehaviours/Gui/MainMenu/ServersList/MainMenuServerListPanel.cs @@ -280,12 +280,14 @@ private void CreateAddServerButton() { GameObject multiplayerButtonInst = Instantiate(multiplayerNewServerButtonRef, serverAreaContent, false); multiplayerButtonInst.name = "NewServer"; // "NewServer" is important, see OnConfirm() - Transform txt = multiplayerButtonInst.RequireTransform("NewGameButton/Text"); - txt.GetComponent().text = "Nitrox_AddServer"; + TextMeshProUGUI txt = multiplayerButtonInst.RequireTransform("NewGameButton/Text").GetComponent(); + txt.text = "Nitrox_AddServer"; + txt.fontSize *= 1.5f; Button multiplayerButtonButton = multiplayerButtonInst.RequireTransform("NewGameButton").GetComponent