public void UpdateGUI() { if (m_Control.prevManeuverExists) { m_ButtonPrev.interactable = true; m_ButtonPrev.GetComponent <Image> ().color = new Color(1.0f, 1.0f, 1.0f, 1.0f); } else { m_ButtonPrev.interactable = false; m_ButtonPrev.GetComponent <Image> ().color = new Color(0.0f, 0.0f, 0.0f, 0.25f); } if (m_Control.nextManeuverExists) { m_ButtonNext.interactable = true; m_ButtonNext.GetComponent <Image> ().color = new Color(1.0f, 1.0f, 1.0f, 1.0f); } else { m_ButtonNext.interactable = false; m_ButtonNext.GetComponent <Image> ().color = new Color(0.0f, 0.0f, 0.0f, 0.25f); } m_Chooser.OptionCount = m_Control.maneuverCount; m_Chooser.SetValueNoInvoke(m_Control.maneuverIdx); }
public void OKButtonAction() { var text = m_Control.TMProText; if (text.Length > 0) { m_Control.AddPreset(text); RepopulateChooser(); var items = presetCache.FindAll(a => (a == text)); if (items.Count == 1) { m_Chooser.SetValueNoInvoke(presetCache.FindIndex(a => (a == text)) + 1); } SwitchChooser(); UpdateControls(); } }