コード例 #1
0
 public override void Draw(SectionModule section)
 {
     if (ThermalProcessor.ShowDetails && FlightGlobals.ActiveVessel.atmDensity > 0.0)
     {
         DrawLine(ThermalProcessor.ConvectionFlux.ToFlux(), section.IsHud);
     }
 }
コード例 #2
0
 public override void Draw(SectionModule section)
 {
     if (SimulationProcessor.ShowDetails)
     {
         this.DrawLine(Units.ToAngle(SimulationProcessor.LastStage.thrustOffsetAngle, 1), section.IsHud);
     }
 }
コード例 #3
0
 public override void Draw(SectionModule section)
 {
     if (FlightGlobals.ActiveVessel.atmDensity > 0.0)
     {
         DrawLine(FlightGlobals.ActiveVessel.mach.ToMach(), section.IsHud);
     }
 }
コード例 #4
0
 public override void Draw(SectionModule section)
 {
     if (AtmosphericProcessor.ShowDetails)
     {
         DrawLine(AtmosphericProcessor.Efficiency.ToPercent(), section.IsHud);
     }
 }
コード例 #5
0
 public override void Draw(SectionModule section)
 {
     if (RendezvousProcessor.ShowDetails)
     {
         this.DrawLine(RendezvousProcessor.RelativeRadialVelocity.ToSpeed(), section.IsHud);
     }
 }
コード例 #6
0
 public override void Draw(SectionModule section)
 {
     if (FlightGlobals.ActiveVessel.atmDensity > 0.0)
     {
         DrawLine(FlightGlobals.ActiveVessel.mach.ToMach(), section.IsHud);
     }
 }
コード例 #7
0
 public override void Draw(SectionModule section)
 {
     if (SimulationProcessor.ShowDetails)
     {
         DrawLine(FlightGlobals.ActiveVessel.vesselName);
     }
 }
コード例 #8
0
 public override void Draw(SectionModule section)
 {
     if (ImpactProcessor.ShowDetails)
     {
         this.DrawLine(Units.ToAngleDMS(ImpactProcessor.Latitude) + (ImpactProcessor.Latitude < 0 ? " S" : " N"), section.IsHud);
     }
 }
コード例 #9
0
 public override void Draw(SectionModule section)
 {
     if (!Double.IsInfinity(FlightGlobals.currentMainBody.sphereOfInfluence))
     {
         this.DrawLine(FlightGlobals.currentMainBody.sphereOfInfluence.ToDistance(), section.IsHud);
     }
 }
コード例 #10
0
 public override void Draw(SectionModule section)
 {
     if (ThermalProcessor.ShowDetails)
     {
         DrawLine(ThermalProcessor.InternalFlux.ToFlux(), section.IsHud);
     }
 }
コード例 #11
0
 public override void Draw(SectionModule section)
 {
     if (ThermalProcessor.ShowDetails)
     {
         DrawLine(ThermalProcessor.CriticalTemperaturePercentage.ToPercent(), section.IsHud);
     }
 }
コード例 #12
0
 public override void Draw(SectionModule section)
 {
     if (ImpactProcessor.ShowDetails)
     {
         this.DrawLine(ImpactProcessor.Biome, section.IsHud);
     }
 }
コード例 #13
0
ファイル: Situation.cs プロジェクト: zxzxn3/KerbalEngineer
        public override void Draw(SectionModule section)
        {
            switch (ScienceUtil.GetExperimentSituation(FlightGlobals.ActiveVessel))
            {
            case ExperimentSituations.SrfLanded:
                this.DrawLine("Landed");
                break;

            case ExperimentSituations.SrfSplashed:
                this.DrawLine("Splashed");
                break;

            case ExperimentSituations.FlyingLow:
                this.DrawLine("Flying Low");
                break;

            case ExperimentSituations.FlyingHigh:
                this.DrawLine("Flying High");
                break;

            case ExperimentSituations.InSpaceLow:
                this.DrawLine("In Space Low");
                break;

            case ExperimentSituations.InSpaceHigh:
                this.DrawLine("In Space High");
                break;
            }
        }
コード例 #14
0
 public override void Draw(SectionModule section)
 {
     if (ThermalProcessor.ShowDetails)
     {
         DrawLine(Units.ToTemperature(ThermalProcessor.CoolestSkinTemperature, ThermalProcessor.CoolestSkinTemperatureMax), section.IsHud);
     }
 }
コード例 #15
0
 public override void Draw(SectionModule section)
 {
     GUILayout.BeginHorizontal();
     GUILayout.Label("Vectored Thrust: ", this.NameStyle);
     SimManager.vectoredThrust = GUILayout.Toggle(SimManager.vectoredThrust, "ENABLED", this.ButtonStyle);
     GUILayout.EndHorizontal();
 }
コード例 #16
0
ファイル: Mass.cs プロジェクト: zxzxn3/KerbalEngineer
 public override void Draw(SectionModule section)
 {
     if (SimulationProcessor.ShowDetails)
     {
         this.DrawLine(Units.ToMass(SimulationProcessor.LastStage.mass, SimulationProcessor.LastStage.totalMass), section.IsHud);
     }
 }
コード例 #17
0
 public override void Draw(SectionModule section)
 {
     if (AtmosphericProcessor.ShowDetails)
     {
         DrawLine(AtmosphericProcessor.Efficiency.ToPercent(), section.IsHud);
     }
 }
コード例 #18
0
 public override void Draw(SectionModule section)
 {
     if (ThermalProcessor.ShowDetails)
     {
         DrawLine(ThermalProcessor.CoolestPartName, section.IsHud);
     }
 }
コード例 #19
0
ファイル: ImpactTime.cs プロジェクト: zxzxn3/KerbalEngineer
 public override void Draw(SectionModule section)
 {
     if (ImpactProcessor.ShowDetails)
     {
         this.DrawLine(TimeFormatter.ConvertToString(ImpactProcessor.Time), section.IsHud);
     }
 }
コード例 #20
0
 public override void Draw(SectionModule section)
 {
     if (ThermalProcessor.ShowDetails && FlightGlobals.ActiveVessel.atmDensity > 0.0)
     {
         DrawLine(ThermalProcessor.ConvectionFlux.ToFlux(), section.IsHud);
     }
 }
コード例 #21
0
 public override void Draw(SectionModule section)
 {
     if (RendezvousProcessor.ShowDetails)
     {
         this.DrawLine(RendezvousProcessor.PeriapsisHeight.ToDistance(), section.IsHud);
     }
 }
コード例 #22
0
 public override void Draw(SectionModule section)
 {
     if (ThermalProcessor.ShowDetails)
     {
         DrawLine(ThermalProcessor.CriticalTemperaturePercentage.ToPercent(), section.IsHud);
     }
 }
コード例 #23
0
 public override void Draw(SectionModule section)
 {
     if (ThermalProcessor.ShowDetails)
     {
         DrawLine(ThermalProcessor.RadiationFlux.ToFlux(), section.IsHud);
     }
 }
コード例 #24
0
ファイル: PartCount.cs プロジェクト: d5039m/KerbalEngineer
 public override void Draw(SectionModule section)
 {
     if (SimulationProcessor.ShowDetails)
     {
         this.DrawLine(Units.ConcatF(SimulationProcessor.LastStage.partCount, SimulationProcessor.LastStage.totalPartCount, 0), section.IsHud);
     }
 }
コード例 #25
0
 public override void Draw(SectionModule section)
 {
     if (FlightGlobals.ActiveVessel.mainBody.atmosphere)
     {
         this.DrawLine(FlightGlobals.ActiveVessel.mainBody.atmosphereDepth.ToDistance(), section.IsHud);
     }
 }
コード例 #26
0
 public override void Draw(SectionModule section)
 {
     if (RendezvousProcessor.ShowDetails)
     {
         this.DrawLine(RendezvousProcessor.PhaseAngle.ToAngle(), section.IsHud);
     }
 }
コード例 #27
0
 public override void Draw(SectionModule section)
 {
     if (SimulationProcessor.ShowDetails)
     {
         this.DrawLine(Units.ToTorque(SimulationProcessor.LastStage.maxThrustTorque), section.IsHud);
     }
 }
コード例 #28
0
ファイル: Thrust.cs プロジェクト: zxzxn3/KerbalEngineer
 public override void Draw(SectionModule section)
 {
     if (SimulationProcessor.ShowDetails)
     {
         this.DrawLine(Units.ToForce(SimulationProcessor.LastStage.actualThrust, SimulationProcessor.LastStage.thrust), section.IsHud);
     }
 }
コード例 #29
0
 public override void Draw(SectionModule section)
 {
     if (ThermalProcessor.ShowDetails)
     {
         DrawLine(ThermalProcessor.CriticalPartName, section.IsHud);
     }
 }
コード例 #30
0
 public override void Draw(SectionModule section)
 {
     if (FlightGlobals.ActiveVessel.mainBody.atmosphere)
     {
         this.DrawLine(FlightGlobals.ActiveVessel.mainBody.scienceValues.flyingAltitudeThreshold.ToDistance(), section.IsHud);
     }
 }
コード例 #31
0
        /// <summary>
        ///     Draws the target selector structure.
        /// </summary>
        public override void Draw(SectionModule section)
        {
            if (FlightGlobals.fetch.VesselTarget == null)
            {
                if (this.vesselType == VesselType.Unknown && !this.typeIsBody)
                {
                    this.DrawSearch();
                    if (this.searchQuery.Length == 0)
                    {
                        this.DrawTypes();
                    }
                    else
                    {
                        this.DrawTargetList();
                    }
                }
                else
                {
                    this.DrawBackToTypes();
                    this.DrawTargetList();
                }
            }
            else
            {
                this.DrawTarget(section);
            }

            if (this.targetObject != FlightGlobals.fetch.VesselTarget)
            {
                this.targetObject    = FlightGlobals.fetch.VesselTarget;
                this.ResizeRequested = true;
            }
        }
コード例 #32
0
        public override void Draw(SectionModule section)
        {
            // Vis-viva: v^2 = GM(2/r - 1/a)
            // All this is easily got from the ships orbit (and reference body)
            String str;
            Orbit  orbit = FlightGlobals.ship_orbit;

            if (orbit.eccentricity > 1.0)
            {
                str = "---m/s";
            }
            else
            {
                double speedsqr = orbit.referenceBody.gravParameter * ((2 / orbit.ApR) - (1 / orbit.semiMajorAxis));
                if (Double.IsNaN(speedsqr) || speedsqr < 0)
                {
                    str = "---m/s";     // Don't think this is possible barring bugs in the Orbit class
                }
                else
                {
                    str = Math.Sqrt(speedsqr).ToSpeed();
                }
            }
            this.DrawLine(str, section.IsHud);
        }
コード例 #33
0
 public override void Draw(SectionModule section)
 {
     if (AtmosphericProcessor.ShowDetails)
     {
         DrawLine(AtmosphericProcessor.StaticPressure.ToPressure(), section.IsHud);
     }
 }
コード例 #34
0
 public override void Draw(SectionModule section)
 {
     GUILayout.BeginHorizontal();
     GUILayout.Label("Log Simulation: ", this.NameStyle);
     SimManager.logOutput = GUILayout.Toggle(SimManager.logOutput, "ENABLED", this.ButtonStyle);
     GUILayout.EndHorizontal();
 }
コード例 #35
0
ファイル: Acceleration.cs プロジェクト: zxzxn3/KerbalEngineer
 public override void Draw(SectionModule section)
 {
     if (SimulationProcessor.ShowDetails)
     {
         this.DrawLine(Units.ToAcceleration(SimulationProcessor.LastStage.actualThrust / SimulationProcessor.LastStage.totalMass, SimulationProcessor.LastStage.thrust / SimulationProcessor.LastStage.totalMass), section.IsHud);
     }
 }
コード例 #36
0
 public override void Draw(SectionModule section)
 {
     if (ThermalProcessor.ShowDetails)
     {
         DrawLine(Units.ToTemperature(ThermalProcessor.CoolestTemperature, ThermalProcessor.CoolestTemperatureMax), section.IsHud);
     }
 }
コード例 #37
0
 public override void Draw(SectionModule section)
 {
     if (RendezvousProcessor.ShowDetails)
     {
         this.DrawLine(Units.ToDistance(RendezvousProcessor.SemiMajorAxis, 3), section.IsHud);
     }
 }
コード例 #38
0
 public override void Draw(SectionModule section)
 {
     if (ImpactProcessor.ShowDetails)
     {
         this.DrawLine(ImpactProcessor.Altitude.ToDistance(), section.IsHud);
     }
 }
コード例 #39
0
 public override void Draw(SectionModule section)
 {
     if (RendezvousProcessor.ShowDetails)
     {
         this.DrawLine(TimeFormatter.ConvertToString(RendezvousProcessor.TimeToRendezvous), section.IsHud);
     }
 }
コード例 #40
0
 public override void Draw(SectionModule section)
 {
     if (SimulationProcessor.ShowDetails)
     {
         this.DrawLine(SimulationProcessor.LastStage.deltaV.ToString("N0") + "m/s (" + TimeFormatter.ConvertToString(SimulationProcessor.LastStage.time) + ")", section.IsHud);
     }
 }
コード例 #41
0
 public override void Draw(SectionModule section)
 {
     var target = FlightGlobals.fetch.VesselTarget?.GetVessel();
     if (target != null)
     {
         double longitude = AngleHelper.Clamp180(target.longitude);
         DrawLine(Units.ToAngleDMS(longitude) + (longitude < 0.0 ? "W" : " E"), section.IsHud);
     }
 }
コード例 #42
0
 public override void Draw(SectionModule section)
 {
     if (FlightGlobals.ActiveVessel.terrainAltitude > 0.0 || FlightGlobals.ActiveVessel.situation == Vessel.Situations.SPLASHED)
     {
         DrawLine((FlightGlobals.ship_altitude - FlightGlobals.ActiveVessel.terrainAltitude).ToDistance(), section.IsHud);
     }
     else
     {
         DrawLine((FlightGlobals.ship_altitude).ToDistance(), section.IsHud);
     }
 }
コード例 #43
0
 public override void Draw(SectionModule section)
 {
     if (FlightGlobals.ActiveVessel.terrainAltitude > 0.0)
     {
         this.DrawLine((FlightGlobals.ship_altitude - FlightGlobals.ActiveVessel.terrainAltitude).ToDistance(), section.IsHud);
     }
     else
     {
         this.DrawLine((FlightGlobals.ship_altitude).ToDistance(), section.IsHud);
     }
 }
コード例 #44
0
        public override void Draw(SectionModule section)
        {
            if (SimulationProcessor.ShowDetails == false || StageManager.Instance == null)
            {
                return;
            }

            foreach (Stage stage in SimulationProcessor.Stages.Where(stage => stage.deltaV > 0 || stage.number == StageManager.CurrentStage))
            {
                DrawLine("DeltaV (S" + stage.number + ")", stage.deltaV.ToString("N0") + "m/s (" + TimeFormatter.ConvertToString(stage.time) + ")", section.IsHud);
            }
        }
コード例 #45
0
        public override void Draw(SectionModule section)
        {
            if (FlightGlobals.currentMainBody == null || SimulationProcessor.LastStage == null ||
                !SimulationProcessor.ShowDetails)
            {
                return;
            }

            m_Gravity = FlightGlobals.currentMainBody.gravParameter / Math.Pow(FlightGlobals.currentMainBody.Radius, 2);
            m_Actual = (SimulationProcessor.LastStage.actualThrust / (SimulationProcessor.LastStage.totalMass * m_Gravity)).ToString("F2");
            m_Total = (SimulationProcessor.LastStage.thrust / (SimulationProcessor.LastStage.totalMass * m_Gravity)).ToString("F2");
            DrawLine("TWR (Surface)", m_Actual + " / " + m_Total, section.IsHud);
        }
コード例 #46
0
ファイル: Longitude.cs プロジェクト: CYBUTEK/KerbalEngineer
 public override void Draw(SectionModule section)
 {
     double angle = AngleHelper.Clamp180(FlightGlobals.ship_longitude);
     DrawLine(Units.ToAngleDMS(angle) + (angle < 0.0 ? " W" : " E"), section.IsHud);
 }
コード例 #47
0
ファイル: SectionInfo.cs プロジェクト: nberardi/omniportal
        public SectionInfo(
			int id,
			string name,
			string title,
			SectionInfo parent,
			int order,
			bool visible,
			bool syndicated,
			string theme,
			string style,
			SectionModule module,
			string owner,
			DateTime touched,
			CommunityInfo community
			)
            : this(id,
			name,
			title,
			(parent == null) ? RootSection.Identity : parent.Identity,
			order,
			visible,
			syndicated,
			theme,
			style,
			module.Identity,
			owner,
			touched,
			community.Identity)
        {
        }
コード例 #48
0
ファイル: PitchRate.cs プロジェクト: antplant/KerbalEngineer
 public override void Draw(SectionModule section)
 {
     this.DrawLine(Units.ToAngle(AttitudeProcessor.PitchRate) + "/sec", section.IsHud);
 }
コード例 #49
0
 /// <summary>
 ///     Creates a section window, adds it to the FlightEngineerCore and returns a reference to it.
 /// </summary>
 public SectionWindow AddSectionWindow(SectionModule section)
 {
     try
     {
         var window = this.gameObject.AddComponent<SectionWindow>();
         window.ParentSection = section;
         window.WindowPosition = new Rect(section.FloatingPositionX, section.FloatingPositionY, 0, 0);
         this.SectionWindows.Add(window);
         return window;
     }
     catch (Exception ex)
     {
         MyLogger.Exception(ex);
         return null;
     }
 }
コード例 #50
0
 /// <summary>
 ///     Creates a section editor, adds it to the FlightEngineerCore and returns a reference to it.
 /// </summary>
 public SectionEditor AddSectionEditor(SectionModule section)
 {
     try
     {
         var editor = this.gameObject.AddComponent<SectionEditor>();
         editor.ParentSection = section;
         editor.Position = new Rect(section.EditorPositionX, section.EditorPositionY, SectionEditor.Width, SectionEditor.Height);
         this.SectionEditors.Add(editor);
         return editor;
     }
     catch (Exception ex)
     {
         MyLogger.Exception(ex);
         return null;
     }
 }
コード例 #51
0
 public override void Draw(SectionModule section)
 {
     DrawLine((FlightGlobals.ship_orbit.meanAnomalyAtEpoch * Units.RAD_TO_DEG).ToAngle(), section.IsHud);
 }
コード例 #52
0
ファイル: Heading.cs プロジェクト: antplant/KerbalEngineer
 public override void Draw(SectionModule section)
 {
     this.DrawLine(Units.ToAngle(AttitudeProcessor.Heading), section.IsHud);
 }
コード例 #53
0
        /// <summary>
        ///     Creates and initialises a new custom section.
        /// </summary>
        public ISectionModule NewCustomSection()
        {
            SectionModule section = new SectionModule
            {
                Name = "Custom " + (SectionLibrary.CustomSections.Count + 1),
                Abbreviation = "CUST " + (SectionLibrary.CustomSections.Count + 1),
                IsVisible = true,
                IsCustom = true,
                IsEditorVisible = true
            };

            SectionLibrary.CustomSections.Add(section);

            return section;
        }