private void Awake() { m_throttleInput.text = "0"; rect = GetComponent <RectTransform>(); m_throttleInput.onValidateInput += delegate(string input, int charIndex, char addedChar) { return(ValidateThrottleInputChar(addedChar)); }; m_throttleInput.onEndEdit.AddListener(delegate { ValidateThrottle(m_throttleInput.text); infoWindowInterface.SetInputLock(false); m_throttleInput.DeactivateInputField(); m_throttleSlider.value = float.Parse(m_throttleInput.text); infoWindowInterface.ThrottleVisible = true; }); m_throttleSlider.onValueChanged.AddListener(delegate { if (m_throttleSlider.value != float.Parse(m_throttleInput.text)) { UpdateInputField(m_throttleSlider.value); } UpdatePersistentThrottle(m_throttleSlider.value); }); }
private void SetInputLocks(bool on) { window.SetInputLock(on); }