private void OnClickButton(PointerEventData arg0, UIRadioButton.State arg1, UIRadioButton.CallType arg2)
        {
            if (!_isEditorState)
            {
                return;
            }

            var stage = arg0.pointerPress.GetComponentInParent <StageGroup>();

            if (stage != null)
            {
                ConfigInfo.Instance.Sequences[ModuleNASACountdown.CraftName(FlightGlobals.ActiveVessel)][_stageIndex] = stage.inverseStageIndex;
                _isEditorState = false;
            }
        }
Esempio n. 2
0
 private void OnClick(PointerEventData data, UIRadioButton.State state, UIRadioButton.CallType callType)
 {
     if (data.button == PointerEventData.InputButton.Left)
     {
         button.onLeftClick();
         button.onLeftClickBtn(button.toggleButton);
     }
     else if (data.button == PointerEventData.InputButton.Middle)
     {
         OnMiddleClick();
     }
     else if (GameSettings.MODIFIER_KEY.GetKey(false) && data.button == PointerEventData.InputButton.Right)
     {
         OnMiddleClick();
     }
     else if (data.button == PointerEventData.InputButton.Right)
     {
         button.onRightClick();
     }
 }
 private void CategoryButtonClick(UnityEngine.EventSystems.PointerEventData pointerEventData, UIRadioButton.State state, UIRadioButton.CallType callType)
 {
     if (pointerEventData.button == UnityEngine.EventSystems.PointerEventData.InputButton.Right)
     {
         SettingsOpen   = true;
         SettingsWindow = new Rect(Input.mousePosition.x, Screen.height - Input.mousePosition.y, SettingsWidth, SettingsHeight);
         pointerEventData.Use();
     }
 }