Ejemplo n.º 1
0
        private void ProcessPopup()
        {
            string newHover = GUI.tooltip;

            if (newHover != "")
            {
                Debug.Log(newHover);
            }
            if (Event.current.type == EventType.Repaint && newHover != hover)
            {
                hover = newHover;
                if (hover == "Masses")
                {
                    LaunchEvent launch = EventProcessor.Instance.launches[flightIdToShow];
                    popupTexts = launch.GetMasses();
                    showPopup  = true;
                }
                else if (hover == "Biomes")
                {
                    LaunchEvent launch = EventProcessor.Instance.launches[flightIdToShow];
                    popupTexts = launch.GetBiomes();
                    showPopup  = true;
                }
                else if (hover == "Science points")
                {
                    LaunchEvent launch = EventProcessor.Instance.launches[flightIdToShow];
                    popupTexts = launch.GetExperiments();
                    showPopup  = true;
                }
                else
                {
                    showPopup = false;
                }
                popupWindowRect.height = 1;
                popupWindowRect.width  = 1;
            }
            popupWindowRect.x = Input.mousePosition.x;
            popupWindowRect.y = Screen.height - Input.mousePosition.y;
        }