コード例 #1
0
        protected override void PrintDisplay()
        {
            GUILayout.BeginVertical();

            GUILayout.BeginHorizontal();
            GUILayout.Label(VesselName);
            GUILayout.FlexibleSpace();
            if (GUILayout.Button("Reload"))
            {
                var vessel = FlightGlobals.FindVessel(VesselId);

                //Do not call BackupVessel() as that would overwrite the proto with the actual vessel values and mess up part syncs
                VesselLoader.LoadVessel(vessel.protoVessel, true);
            }
            GUILayout.EndHorizontal();

            Data.Display = GUILayout.Toggle(Data.Display, nameof(Data), ButtonStyle);
            Data.Print();
            Locks.Display = GUILayout.Toggle(Locks.Display, nameof(Locks), ButtonStyle);
            Locks.Print();
            Orbit.Display = GUILayout.Toggle(Orbit.Display, nameof(Orbit), ButtonStyle);
            Orbit.Print();
            Interpolation.Display = GUILayout.Toggle(Interpolation.Display, nameof(Interpolation), ButtonStyle);
            Interpolation.Print();
            Position.Display = GUILayout.Toggle(Position.Display, nameof(Position), ButtonStyle);
            Position.Print();
            Vectors.Display = GUILayout.Toggle(Vectors.Display, nameof(Vectors), ButtonStyle);
            Vectors.Print();
            GUILayout.EndVertical();
        }