Example #1
0
        private void OnFirstGUI()
        {
            string defaultMode = "";

            if (HighLogic.CurrentGame.Parameters.CustomParams <MNS>().byDv)
            {
                defaultMode = "by dV";
            }
            if (HighLogic.CurrentGame.Parameters.CustomParams <MNS>().byAp)
            {
                defaultMode = "by Apoapsis";
            }
            if (HighLogic.CurrentGame.Parameters.CustomParams <MNS>().byBurnTime)
            {
                defaultMode = "by Burn Time";
            }
            if (HighLogic.CurrentGame.Parameters.CustomParams <MNS>().byPeriod)
            {
                defaultMode = "by Period";
            }

            int index = splitters.FindIndex((s) => { return(string.Compare(s.GetName(), defaultMode, true) == 0); });

            if (index >= 0)
            {
                currentSplitter = splitters[index];
            }
            initialized = true;
        }
        private void OnFirstGUI()
        {
            int index = splitters.FindIndex((s) => { return(string.Compare(s.GetName(), MNSSettings.Instance.defaultMode, true) == 0); });

            if (index >= 0)
            {
                currentSplitter = splitters[index];
            }
            initialized = true;
        }
Example #3
0
        internal void NextSplitter()
        {
            int index = splitters.IndexOf(currentSplitter) + 1;

            if (index >= splitters.Count)
            {
                index = 0;
            }
            currentSplitter = splitters[index];
            ResetWindow();
        }
Example #4
0
        internal void PreviousSplitter()
        {
            int index = splitters.IndexOf(currentSplitter) - 1;

            if (index < 0)
            {
                index = splitters.Count - 1;
            }
            currentSplitter = splitters[index];
            ResetWindow();
        }
 public void Awake()
 {
     splitters.Add(new NodeSplitterByApoapsis(this));
     if(NodeSplitterByBurnTime.Available)
     {
         splitters.Add(new NodeSplitterByBurnTime(this));
     }
     splitters.Add(new NodeSplitterByDeltaV(this));
     splitters.Add(new NodeSplitterByPeriod(this));
     splitters.Sort((l, r) => { return string.Compare(l.GetName(), r.GetName(), true); });
     currentSplitter = splitters[0];
 }
 public void Awake()
 {
     splitters.Add(new NodeSplitterByApoapsis(this));
     if (NodeSplitterByBurnTime.Available)
     {
         splitters.Add(new NodeSplitterByBurnTime(this));
     }
     splitters.Add(new NodeSplitterByDeltaV(this));
     splitters.Add(new NodeSplitterByPeriod(this));
     splitters.Sort((l, r) => { return(string.Compare(l.GetName(), r.GetName(), true)); });
     currentSplitter = splitters[0];
 }
 private void OnFirstGUI()
 {
     int index = splitters.FindIndex((s) => { return string.Compare(s.GetName(), MNSSettings.Instance.defaultMode, true) == 0; });
     if(index >= 0)
     {
         currentSplitter = splitters[index];
     }
     initialized = true;
 }
 internal void PreviousSplitter()
 {
     int index = splitters.IndexOf(currentSplitter) - 1;
     if(index < 0)
     {
         index = splitters.Count - 1;
     }
     currentSplitter = splitters[index];
     ResetWindow();
 }
 internal void NextSplitter()
 {
     int index = splitters.IndexOf(currentSplitter) + 1;
     if(index >= splitters.Count)
     {
         index = 0;
     }
     currentSplitter = splitters[index];
     ResetWindow();
 }