Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Jannify committed Nov 15, 2024
1 parent b104776 commit 3175938
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,17 @@ public void SelectItem(object item)
{
selectedInputField.Select();
}
else
else // Button
{
selectedItem.transform.GetChild(0).GetComponent<Image>().sprite = MainMenuServerListPanel.SelectedSprite;
selectedItem.GetComponentInChildren<uGUI_BasicColorSwap>().makeTextBlack();
}

if (!EventSystem.current.alreadySelecting)
{
EventSystem.current.SetSelectedGameObject(selectedItem);
}

selectedItem.GetComponentInChildren<uGUI_BasicColorSwap>().makeTextBlack();
RuntimeManager.PlayOneShot(MainMenuServerListPanel.HoverSound.path);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<TextMeshProUGUI>().text = "Nitrox_AddServer";
TextMeshProUGUI txt = multiplayerButtonInst.RequireTransform("NewGameButton/Text").GetComponent<TextMeshProUGUI>();
txt.text = "Nitrox_AddServer";
txt.fontSize *= 1.5f;

Button multiplayerButtonButton = multiplayerButtonInst.RequireTransform("NewGameButton").GetComponent<Button>();
multiplayerButtonButton.onClick = new Button.ButtonClickedEvent();
multiplayerButtonButton.onClick.AddListener(OpenAddServerGroup);
multiplayerButtonButton.GetComponent<Image>().color = new Color(0.7f, 0.7f, 1f);

ForwardTriggerScrollToScrollRect(multiplayerButtonButton.GetComponent<EventTrigger>());
}
Expand Down

0 comments on commit 3175938

Please sign in to comment.