private void Update()
        {
            if (m_skipUpdate)
            {
                m_skipUpdate = false;
                return;
            }

            if (Input.GetKeyDown(m_toggleButton))
            {
                m_visibilityController.Toggle();
            }
        }
Пример #2
0
        private void DrawMaximizedWindow(int windowId)
        {
            GUILayout.BeginVertical();
            DrawWindowButtons();

            bool enabled      = !m_visibilityController.IsVisible;
            bool shouldEnable = GUILayout.Toggle(enabled, "Enabled");

            if (enabled != shouldEnable)
            {
                m_visibilityController.Toggle();
            }

            GUILayout.Space(20);
            m_configuration.HideVesselIcons         = GUILayout.Toggle(m_configuration.HideVesselIcons, "Hide vessel icons");
            m_configuration.HideVesselOrbits        = GUILayout.Toggle(m_configuration.HideVesselOrbits, "Hide vessel orbits");
            m_configuration.HideCelestialBodyIcons  = GUILayout.Toggle(m_configuration.HideCelestialBodyIcons, "Hide celestial body icons");
            m_configuration.HideCelestialBodyOrbits = GUILayout.Toggle(m_configuration.HideCelestialBodyOrbits, "Hide celestial body orbits");
            GUILayout.Space(20);
            DrawKeyBinding();
            GUILayout.EndVertical();

            GUI.DragWindow();
        }
        internal void Update()
        {
            if (m_skipUpdate)
            {
                m_skipUpdate = false;
                return;
            }

            if (Input.GetKeyDown(m_toggleButton))
            {
#if false
                if (m_visibilityController == null)
                {
                    m_visibilityController = new OrbitVisibilityController(m_configuration);
                    m_visibilityController.OnVisibilityChanged += OnOrbitVisibilityChanged;
                }
#endif
                m_visibilityController.Toggle();
            }
        }