Пример #1
0
        protected void OnGUI()
        {
            string             resourcename = FNResourceManager.FNRESOURCE_MEGAJOULES;
            Vessel             vessel       = FlightGlobals.ActiveVessel;
            ORSResourceManager mega_manager = null;

            if (vessel != null)
            {
                if (FNResourceOvermanager.getResourceOvermanagerForResource(resourcename).hasManagerForVessel(vessel) && !hide_button)
                {
                    mega_manager = FNResourceOvermanager.getResourceOvermanagerForResource(resourcename).getManagerForVessel(vessel);
                    if (mega_manager.getPartModule() != null)
                    {
                        mega_manager.OnGUI();

                        GUILayout.BeginArea(button_position);
                        if (GUILayout.Button(guibuttontexture))
                        {
                            mega_manager.showWindow();
                        }
                        GUILayout.EndArea();
                    }
                }
            }
        }
        protected void OnGUI()
        {
            string             resourcename = FNResourceManager.FNRESOURCE_MEGAJOULES;
            Vessel             vessel       = FlightGlobals.ActiveVessel;
            ORSResourceManager mega_manager = null;

            if (vessel == null)
            {
                return;
            }


            if (FNResourceOvermanager.getResourceOvermanagerForResource(resourcename).hasManagerForVessel(vessel) && !hide_button)
            {
                mega_manager = FNResourceOvermanager.getResourceOvermanagerForResource(resourcename).getManagerForVessel(vessel);
                if (mega_manager.getPartModule() != null)
                {
                    mega_manager.OnGUI();

                    if (show_window)
                    {
                        mega_manager.showWindow();
                    }
                }
            }
        }