Beispiel #1
0
        private void OnNewUIEvent(UIEvent uievent)       // UI event in, see if we want to hide.  UI events come before any onNew
        {
            EliteDangerousCore.UIEvents.UIPosition up = uievent as EliteDangerousCore.UIEvents.UIPosition;

            if (up != null)
            {
                if (up.Location.ValidPosition)
                {
                    latitude  = up.Location.Latitude;
                    longitude = up.Location.Longitude;
                    altitude  = up.Location.Altitude;
                    heading   = up.Heading;
                    DisplayCompass();
                }
                else
                {
                    latitude = longitude = heading = altitude = null;
                    DisplayCompass();
                }
            }

            var gui = uievent as EliteDangerousCore.UIEvents.UIGUIFocus;

            if (gui != null)
            {
                uistate = gui.GUIFocus;
                DisplayCompass();
            }
        }
Beispiel #2
0
        private void OnNewUIEvent(UIEvent uievent)       // UI event in, see if we want to hide.  UI events come before any onNew
        {
            EliteDangerousCore.UIEvents.UIPosition up = uievent as EliteDangerousCore.UIEvents.UIPosition;

            latitude  = up?.Location?.Latitude;
            longitude = up?.Location?.Longitude;
            heading   = up?.Heading;
            Display();
        }
        private void OnNewUIEvent(UIEvent uievent)       // UI event in, see if we want to hide.  UI events come before any onNew
        {
            EliteDangerousCore.UIEvents.UIPosition up = uievent as EliteDangerousCore.UIEvents.UIPosition;

            if (up != null)
            {
                if (up.Location.ValidPosition)
                {
                    latitude  = up.Location.Latitude;
                    longitude = up.Location.Longitude;
                    heading   = up.Heading;
                }
                else
                {
                    latitude = longitude = heading = null;
                }
            }

            DisplayCompass();
        }