private void OnHotkeyTextInputValueChanged(string text) { if (_changingVisibility || _changingSelectedAction) { return; } UpdateHotkeyPanelWithText(_activeActionPanel, text); var textAction = GetHotkeyActionForPanel <HotkeyTextAction>(_activeActionPanel); if (text.Length == 0) { if (textAction != null) { SetHotketActionForPanel <HotkeyAction>(_activeActionPanel, null); } } else if (textAction == null) { textAction = new HotkeyTextAction(text, _autoSendCheckboxWrapper.checkbox.Checked); SetHotketActionForPanel(_activeActionPanel, textAction); } else { textAction.Text = text; } }
private void OnAutoSendValueChanged(bool value) { if (_changingSelectedAction) { return; } if (value) { _activeActionPanel.textComponent.color = Core.Colors.ColorFromRGB(0xFEFEFE); } else { _activeActionPanel.textComponent.color = Core.Colors.ColorFromRGB(0xC0C0C0); } var textAction = GetHotkeyActionForPanel <HotkeyTextAction>(_activeActionPanel); if (textAction == null) { textAction = new HotkeyTextAction(_hotkeyTextInputField.text, value); SetHotketActionForPanel(_activeActionPanel, textAction); } else { textAction.AutoSend = value; } }
private void OnHotkeyTextInputValueChanged(string text) { if (m_ChangingSelectedAction) { return; } if (text.Length == 0) { m_ActiveActionPanel.textComponent.text = m_ActiveActionPanel.BaseText + ":"; } else { m_ActiveActionPanel.textComponent.text = string.Format("{0}: {1}", m_ActiveActionPanel.BaseText, Core.StringHelper.RichTextSpecialChars(text)); } var textAction = GetHotkeyActionForPanel <HotkeyTextAction>(m_ActiveActionPanel); if (textAction == null) { textAction = new HotkeyTextAction(text, m_AutoSendCheckboxWrapper.checkbox.Checked); SetHotketActionForPanel(m_ActiveActionPanel, textAction); } else { textAction.Text = text; } }