Пример #1
0
 public void Startup()
 {
     isReady         = true;
     Instance        = this;
     cores           = new List <string>();
     vesselsToDelete = new List <Guid>();
     partsToDelete   = new List <PartStatus>();
 }
Пример #2
0
        internal void Startup()
        {
            tfScenario = TestFlightManagerScenario.Instance;
            if (!tfScenario.SettingsEnabled)
            {
                return;
            }

            tfScenario.userSettings.Load();
            tfManager = TestFlightManager.Instance;
            Log("Starting coroutine to add toolbar icon");
            StartCoroutine("AddToToolbar");
            TestFlight.Resources.LoadTextures();

            if (HighLogic.LoadedSceneIsFlight && tfScenario.userSettings.enableHUD && hud == null)
            {
                hud = gameObject.AddComponent(typeof(TestFlightHUD)) as TestFlightHUD;
                if (hud != null)
                {
                    Log("Starting up TestFlightHUD");
                    hud.Startup(this);
                }
                GameEvents.onGameSceneLoadRequested.Add(Event_OnGameSceneLoadRequested);
            }
            // Default position and size -- will get proper bounds calculated when needed
            WindowRect         = new Rect(0, 50, 500, 50);
            DragEnabled        = !tfScenario.userSettings.mainWindowLocked;
            ClampToScreen      = true;
            TooltipsEnabled    = true;
            TooltipMouseOffset = new Vector2d(10, 10);
            TooltipStatic      = true;
            WindowCaption      = "";
            List <string> views = new List <string>()
            {
                "Visual Settings",
                "Difficulty/Performance Settings",
                "Miscellaneous",
                "SaveGame Settings"
            };

            ddlSettingsPage = new DropDownList(views, this);
            ddlManager.AddDDL(ddlSettingsPage);
            ddlSettingsPage.OnSelectionChanged += SettingsPage_OnSelectionChanged;
            WindowMoveEventsEnabled             = true;
            onWindowMoveComplete += MainWindow_OnWindowMoveComplete;
            CalculateWindowBounds();
            Visible = tfScenario.userSettings.showMSD;
        }
Пример #3
0
        public void Startup()
        {
            isReady         = true;
            Instance        = this;
            cores           = new List <string>();
            vesselsToDelete = new List <Guid>();
            partsToDelete   = new List <PartStatus>();

            // register to be notified of changes to any vessel
            GameEvents.onVesselWasModified.Add(VesselWasModified);
            GameEvents.onVesselCreate.Add(VesselCreated);
            GameEvents.onVesselDestroy.Add(VesselDestroyed);
            // Build an initial list of vessels and part data
            // This will then be updated from the above event
            if (masterStatus == null)
            {
                masterStatus = new Dictionary <Guid, MasterStatusItem>();
            }

            currentUTC = Planetarium.GetUniversalTime();
        }
Пример #4
0
 public void Startup()
 {
     isReady = true;
     Instance = this;
     cores = new List<string>();
     vesselsToDelete = new List<Guid>();
     partsToDelete = new List<PartStatus>();
 }
Пример #5
0
        internal void Startup()
        {
            tfScenario = TestFlightManagerScenario.Instance;
            tfScenario.userSettings.Load();
            tfManager = TestFlightManager.Instance;
            Log("Starting coroutine to add toolbar icon");
            StartCoroutine("AddToToolbar");
            TestFlight.Resources.LoadTextures();

            if (HighLogic.LoadedSceneIsFlight && tfScenario.userSettings.enableHUD && hud == null)
            {
                hud = gameObject.AddComponent(typeof(TestFlightHUD)) as TestFlightHUD;
                if (hud != null)
                {
                    Log("Starting up TestFlightHUD");
                    hud.Startup(this);
                }
                GameEvents.onGameSceneLoadRequested.Add(Event_OnGameSceneLoadRequested);
            }
            // Default position and size -- will get proper bounds calculated when needed
            WindowRect = new Rect(0, 50, 500, 50);
            DragEnabled = !tfScenario.userSettings.mainWindowLocked;
            ClampToScreen = true;
            TooltipsEnabled = true;
            TooltipMouseOffset = new Vector2d(10, 10);
            TooltipStatic = true;
            WindowCaption = "";
            List<string> views = new List<string>()
            {
                "Visual Settings",
                "Difficulty/Performance Settings",
                "Miscellaneous",
                "SaveGame Settings"
            };
            ddlSettingsPage = new DropDownList(views, this);
            ddlManager.AddDDL(ddlSettingsPage);
            ddlSettingsPage.OnSelectionChanged += SettingsPage_OnSelectionChanged;
            WindowMoveEventsEnabled = true;
            onWindowMoveComplete += MainWindow_OnWindowMoveComplete;
            CalculateWindowBounds();
            Visible = tfScenario.userSettings.showMSD;
        }
Пример #6
0
 public void Startup()
 {
     isReady  = true;
     Instance = this;
 }
Пример #7
0
 public void Startup()
 {
     isReady = true;
     Instance = this;
 }