public bool HandleInput(Rewired.InputActionEventData data) { bool handled = false; switch (data.actionId) { //case RewiredConsts.Action.Navigate_Horizontal: // float value = data.GetAxis(); // if (value != 0f && m_MenuItems[m_ActiveIndex].m_Togglable) // { // // will need to figure out how to cut out of this. will likely need to change the switch to an if/else // // audio // VSEventManager.Instance.TriggerEvent(new AudioEvents.RequestUIAudioEvent(true, AudioManager.eUIClip.Navigate)); // } // break; case RewiredConsts.Action.Navigate_Vertical: float value = data.GetAxis(); if (value != 0f && m_CurrentTime <= 0f) { if (value < 0f) { m_ActiveIndex = (m_ActiveIndex + 1) % m_MenuLabels.Length; } else if (value > 0f) { if (m_ActiveIndex - 1 < 0) { m_ActiveIndex = m_MenuLabels.Length; } m_ActiveIndex -= 1; } SetActiveItem(m_ListItems[m_ActiveIndex]); m_CurrentTime = m_ScrollDelay; // audio //VSEventManager.Instance.TriggerEvent(new AudioEvents.RequestUIAudioEvent(true, AudioManager.eUIClip.Navigate)); handled = true; } m_CurrentTime -= Time.deltaTime; break; case RewiredConsts.Action.Confirm: if (data.GetButtonDown()) { OnItemSelected(m_ActiveIndex); // audio //VSEventManager.Instance.TriggerEvent(new AudioEvents.RequestUIAudioEvent(true, AudioManager.eUIClip.Confirm)); handled = true; } break; } return(handled); }