Exemple #1
0
 private void OnEnterFocus(UIComponent comp, UIFocusEventParameter p)
 {
     if (p.gotFocus == base.component)
     {
         this.m_SaveList.Focus();
     }
 }
Exemple #2
0
 private void OnTextfieldLostFocus(UIComponent component, UIFocusEventParameter eventParam)
 {
     if (_ignoreEvents)
     {
         return;
     }
     OnTextfieldTextSubmitted(_textfield, _textfield.text);
 }
Exemple #3
0
        private void OnTextfieldLostFocus(UIComponent component, UIFocusEventParameter eventParam)
        {
            var textfield = component as UITextField;

            if (textfield != null)
            {
                OnTextfieldTextSubmitted(component, textfield.text);
            }
        }
Exemple #4
0
        private void OnGotFocus(UIComponent component, UIFocusEventParameter eventParam)
        {
            if (_ignoreEvents)
            {
                return;
            }
            var textField = component as UITextField;

            textField?.SelectAll();
        }
Exemple #5
0
        private void OnTextfieldLostFocus(UIComponent component, UIFocusEventParameter eventParam)
        {
            if (_ignoreEvents)
            {
                return;
            }
            var textfield = component as UITextField;

            OnTextfieldTextSubmitted(component, textfield?.text);
        }
Exemple #6
0
 private void ProbabilityTextField_eventLostFocus(UIComponent component, UIFocusEventParameter eventParam)
 {
     if (float.TryParse(probabilityTextField.text, out float value))
     {
         probabilitySlider.eventValueChanged -= ProbabilitySlider_eventValueChanged;
         probabilitySlider.value              = value;
         probabilitySlider.eventValueChanged += ProbabilitySlider_eventValueChanged;
         SetProbability(value, Prefab);
         UserMod.SaveSettings();
     }
 }
        void refreshInterval_eventLeaveFocus(UIComponent component, UIFocusEventParameter eventParam)
        {
            int t = 1;

            if (int.TryParse(refreshInterval.text, out t))
            {
                CSLStatsPanelConfigSettings.PanelRefreshRate = t;
            }
            if (CSLStatsPanelConfigSettings.PanelRefreshRate != t)
            {
                refreshInterval.text = CSLStatsPanelConfigSettings.PanelRefreshRate.ToString();
            }
        }
        private void OnPopupLostFocus(UIComponent component, UIFocusEventParameter eventParam)
        {
            var uiView     = Popup.GetUIView();
            var mouse      = uiView.ScreenPointToGUI(Input.mousePosition / uiView.inputScale);
            var popupRect  = new Rect(Popup.absolutePosition, Popup.size);
            var buttonRect = new Rect(absolutePosition, size);

            if (!popupRect.Contains(mouse) && !buttonRect.Contains(mouse))
            {
                ClosePopup();
            }
            else
            {
                Popup.Focus();
            }
        }
Exemple #9
0
        private void SearchTextField_eventLostFocus(UIComponent component, UIFocusEventParameter eventParam)
        {
            switch (UserMod.Settings.FilterStyle)
            {
            case FilterStyle.Basic:
                Filtering.FilterTreeListBasic(SearchTextField.text);
                break;

            case FilterStyle.AND:
                Filtering.FilterTreeListExclusive(SearchTextField.text);
                break;

            case FilterStyle.OR:
                Filtering.FilterTreeListInclusive(SearchTextField.text);
                break;
            }
        }
Exemple #10
0
 private void RenameBrushTextField_eventLostFocus(UIComponent component, UIFocusEventParameter eventParam)
 {
     UserMod.SaveSettings();
 }
Exemple #11
0
        private void OnGotFocus(UIComponent component, UIFocusEventParameter eventParam)
        {
            UITextField textField = component as UITextField;

            textField.SelectAll();
        }
 protected override void OnGotFocus(UIFocusEventParameter p)
 {
     base.OnGotFocus(p);
 }
Exemple #13
0
 private void OnGotFocusBind(UIComponent component, UIFocusEventParameter eventParam) => m_cachedScrollPosition = m_scrollPanel.scrollPosition;
Exemple #14
0
 private void fecharTelaTransportes(UIComponent component, UIFocusEventParameter eventParam)
 {
     fecharTelaTransportes(component, (UIMouseEventParameter)null);
 }
 private void setNextLineNumber(UIComponent component, UIFocusEventParameter eventParam)
 {
     saveLineNumber();
 }
Exemple #16
0
 private void ProbabilityTextField_eventGotFocus(UIComponent component, UIFocusEventParameter eventParam)
 {
     probabilityTextField.SelectAll();
 }
Exemple #17
0
 protected override void OnGotFocus(UIFocusEventParameter p)
 {
     base.OnGotFocus(p);
 }
Exemple #18
0
 private void OnSearchLostFocus(UIComponent component, UIFocusEventParameter eventParam)
 {
     EventLostFocus?.Invoke();
 }
Exemple #19
0
 public FocusEventArgs(UIFocusEventParameter originalParams)
     : base(originalParams)
 {
     this.FocusedControl   = ColossalControl.FromUIComponent(originalParams.gotFocus);
     this.LostFocusControl = ColossalControl.FromUIComponent(originalParams.lostFocus);
 }
 private void DropdownFilterFieldOnEventLostFocus(UIComponent component, UIFocusEventParameter eventparam)
 {
     _netList.DisableSearchMode(_filteredItemIndex);
 }