public override void SetPressed(bool value) { if (value) { if (!isPressed) { if (ParentMenu != null) { ParentMenu.LastFocused = this; ParentMenu.LastPressed = this; } SoundManager.instance.PlayUiEfx(pressSound); if (IsControlFocusedInGroup()) { currentFocused[controlGroup].SetFocused(false); } if (controlGroup != null) { currentPressed.Add(controlGroup, this); } isPressed = true; front.gameObject.SetActive(true); front.SetColor(pressColor); mark.SetColor(lightColor); textName.SetColor(lightColor); pointer.SetPress(); StartCoroutine(FadeSelection(1f, 0f, 0.1f)); StartCoroutine(ChangeWidth(normalWidth, pressWidth)); OptionsBox.Open(this); } } else { if (isPressed) { if (ParentMenu != null && ParentMenu.LastPressed == this) { ParentMenu.LastPressed = null; } if (IsControlPressedInGroup()) { currentPressed.Remove(controlGroup); SetFocused(true); } isPressed = false; StartCoroutine(FadeSelection(0f, 1f, 0.1f)); StartCoroutine(ChangeWidth(pressWidth, normalWidth)); } } }