Exemplo n.º 1
0
        public void Start()
        {
            if (ResonantOrbitCalculator_Persistent.Instance.lastSelectedPlanet == "")
            {
                ResonantOrbitCalculator_Persistent.Instance.lastSelectedPlanet = FlightGlobals.GetHomeBody().name;
            }
            PlanetSelection.setSelectedBody(ResonantOrbitCalculator_Persistent.Instance.lastSelectedPlanet);
            GUI.color = new Color(0.85f, 0.85f, 0.85f, 1);

            winStyle = new GUIStyle(HighLogic.Skin.window);
            winStyle.active.background = winStyle.normal.background;
            Texture2D tex = winStyle.normal.background; //.CreateReadable();

            var pixels = tex.GetPixels32();

            for (int i = 0; i < pixels.Length; ++i)
            {
                pixels[i].a = 255;
            }

            tex.SetPixels32(pixels);
            tex.Apply();

            winStyle.active.background  = tex;
            winStyle.focused.background = tex;
            winStyle.normal.background  = tex;
        }
Exemplo n.º 2
0
 void Start()
 {
     Debug.Log("CorrectCoL_Persistent.Start");
     if (HighLogic.CurrentGame.Parameters.CustomParams <ROCParams>().useLastPlanet)
     {
         if (lastSelectedPlanet != "")
         {
             PlanetSelection.setSelectedBody(lastSelectedPlanet);
         }
     }
 }