Example #1
0
        //*********************TURNING OFF FOR NOW
        //void Awake()
        //{
        //    if (ToolbarManager.ToolbarAvailable)
        //    {
        //        this.stationTButton = ToolbarManager.Instance.add("UKS", "stationManager");
        //        stationTButton.TexturePath = "UmbraSpaceIndustries/Kolonization/StationManager24";
        //        stationTButton.ToolTip = "USI Station Manager";
        //        stationTButton.Enabled = true;
        //        stationTButton.OnClick += (e) => { if(windowVisible) { GuiOff(); windowVisible = false; } else { GuiOn(); windowVisible = true; } };
        //    }
        //    else
        //    {
        //        var texture = new Texture2D(36, 36, TextureFormat.RGBA32, false);
        //        var textureFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "StationManager.png");
        //        texture.LoadImage(System.IO.File.ReadAllBytes(textureFile));
        //        this.stationButton = ApplicationLauncher.Instance.AddModApplication(GuiOn, GuiOff, null, null, null, null,
        //            ApplicationLauncher.AppScenes.ALWAYS, texture);
        //    }
        //}

        private void GuiOn()
        {
            if (_stationView == null)
            {
                _stationView = new StationView(FlightGlobals.ActiveVessel);
            }
            _stationView.SetVisible(true);
        }
Example #2
0
 private void GuiOff()
 {
     _stationView = new StationView(FlightGlobals.ActiveVessel);
     _stationView.SetVisible(false);
 }