Esempio n. 1
0
        public StatusWindow(ScienceChecklistAddon Parent)
            : base("[x] Science! Here and Now", 250, 30)
        {
            _parent                      = Parent;
            _logger                      = new Logger(this);
            _filter                      = new ExperimentFilter(_parent);
            _filter.DisplayMode          = DisplayMode.CurrentSituation;
            _filter.EnforceLabLanderMode = true;

            _emptyTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
            _emptyTexture.SetPixels(new[] { Color.clear });
            _emptyTexture.Apply();
            _progressTexture = TextureHelper.FromResource("ScienceChecklist.icons.scienceProgress.png", 13, 13);
            _completeTexture = TextureHelper.FromResource("ScienceChecklist.icons.scienceComplete.png", 13, 13);

            _availableScienceExperiments = new Dictionary <string, bool>( );

            _parent.Config.HideCompleteEventsChanged      += (s, e) => RefreshFilter(s, e);
            _parent.Config.CompleteWithoutRecoveryChanged += (s, e) => RefreshFilter(s, e);

            _parent.ScienceEventHandler.FilterUpdateEvent += (s, e) => RefreshFilter(s, e);
            _parent.ScienceEventHandler.SituationChanged  += (s, e) => UpdateSituation(s, e);
            this.Resizable = false;
            _filter.UpdateFilter( );
        }
Esempio n. 2
0
        /// <summary>
        /// Creates a new instance of the ScienceWindow class.
        /// </summary>
        public ScienceWindow()
        {
            _logger = new Logger(this);
            _rect = new Rect(40, 40, 500, 400);
            _rect3 = new Rect(40, 40, 400, 200);
            _scrollPos = new Vector2();
            _filter = new ExperimentFilter();
            _progressTexture =			TextureHelper.FromResource( "ScienceChecklist.icons.scienceProgress.png", 13, 13 );
            _completeTexture =			TextureHelper.FromResource( "ScienceChecklist.icons.scienceComplete.png", 13, 13 );
            _progressTextureCompact =	TextureHelper.FromResource( "ScienceChecklist.icons.scienceProgressCompact.png", 8, 8 );
            _completeTextureCompact =	TextureHelper.FromResource( "ScienceChecklist.icons.scienceCompleteCompact.png", 8, 8 );
            _currentSituationTexture =	TextureHelper.FromResource( "ScienceChecklist.icons.currentSituation.png", 25, 21 );
            _currentVesselTexture =		TextureHelper.FromResource( "ScienceChecklist.icons.currentVessel.png", 25, 21 );
            _unlockedTexture =			TextureHelper.FromResource( "ScienceChecklist.icons.unlocked.png", 25, 21 );
            _allTexture =				TextureHelper.FromResource( "ScienceChecklist.icons.all.png", 25, 21 );
            _searchTexture =			TextureHelper.FromResource( "ScienceChecklist.icons.search.png", 25, 21 );
            _clearSearchTexture =		TextureHelper.FromResource( "ScienceChecklist.icons.clearSearch.png", 25, 21 );
            _settingsTexture =			TextureHelper.FromResource( "ScienceChecklist.icons.settings.png", 25, 21 );
            _maximizeTexture =			TextureHelper.FromResource( "ScienceChecklist.icons.minimize.png", 25, 21 );
            _minimizeTexture =			TextureHelper.FromResource( "ScienceChecklist.icons.maximize.png", 25, 21 );

            _emptyTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
            _emptyTexture.SetPixels(new[] { Color.clear });
            _emptyTexture.Apply();
            _settingsPanel = new SettingsPanel();
            _settingsPanel.HideCompleteEventsChanged += (s, e) => _filter.UpdateFilter( );
            _settingsPanel.CheckDebrisChanged += ( s, e ) => _filter.UpdateExperiments( );
            _settingsPanel.CompleteWithoutRecoveryChanged += ( s, e ) => _filter.UpdateFilter( );
        }
Esempio n. 3
0
        /// <summary>
        /// Creates a new instance of the ScienceWindow class.
        /// </summary>
        public ScienceWindow()
        {
            _logger                  = new Logger(this);
            _rect                    = new Rect(40, 40, 500, 400);
            _rect3                   = new Rect(40, 40, 400, 200);
            _scrollPos               = new Vector2();
            _filter                  = new ExperimentFilter();
            _progressTexture         = TextureHelper.FromResource("ScienceChecklist.icons.scienceProgress.png", 13, 13);
            _completeTexture         = TextureHelper.FromResource("ScienceChecklist.icons.scienceComplete.png", 13, 13);
            _progressTextureCompact  = TextureHelper.FromResource("ScienceChecklist.icons.scienceProgressCompact.png", 8, 8);
            _completeTextureCompact  = TextureHelper.FromResource("ScienceChecklist.icons.scienceCompleteCompact.png", 8, 8);
            _currentSituationTexture = TextureHelper.FromResource("ScienceChecklist.icons.currentSituation.png", 25, 21);
            _currentVesselTexture    = TextureHelper.FromResource("ScienceChecklist.icons.currentVessel.png", 25, 21);
            _unlockedTexture         = TextureHelper.FromResource("ScienceChecklist.icons.unlocked.png", 25, 21);
            _allTexture              = TextureHelper.FromResource("ScienceChecklist.icons.all.png", 25, 21);
            _searchTexture           = TextureHelper.FromResource("ScienceChecklist.icons.search.png", 25, 21);
            _clearSearchTexture      = TextureHelper.FromResource("ScienceChecklist.icons.clearSearch.png", 25, 21);
            _settingsTexture         = TextureHelper.FromResource("ScienceChecklist.icons.settings.png", 25, 21);
            _maximizeTexture         = TextureHelper.FromResource("ScienceChecklist.icons.minimize.png", 25, 21);
            _minimizeTexture         = TextureHelper.FromResource("ScienceChecklist.icons.maximize.png", 25, 21);

            _emptyTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
            _emptyTexture.SetPixels(new[] { Color.clear });
            _emptyTexture.Apply();
            _settingsPanel = new SettingsPanel();
            _settingsPanel.HideCompleteEventsChanged      += (s, e) => _filter.UpdateFilter( );
            _settingsPanel.CheckDebrisChanged             += (s, e) => _filter.UpdateExperiments( );
            _settingsPanel.CompleteWithoutRecoveryChanged += (s, e) => _filter.UpdateFilter( );
        }
Esempio n. 4
0
        public StatusWindow(ScienceChecklistAddon Parent)
            : base("[x] Science! Here and Now", 250, 30)
        {
            _parent                      = Parent;
            UiScale                      = _parent.Config.UiScale;
            _logger                      = new Logger(this);
            _filter                      = new ExperimentFilter(_parent);
            _filter.DisplayMode          = DisplayMode.CurrentSituation;
            _filter.EnforceLabLanderMode = true;

            _emptyTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
            _emptyTexture.SetPixels(new[] { Color.clear });
            _emptyTexture.Apply();
            _progressTexture = TextureHelper.LoadImage("icons\\scienceProgress.png", 13, 13);
            _completeTexture = TextureHelper.LoadImage("icons\\scienceComplete.png", 13, 13);

            _GfxTimeWarp         = TextureHelper.LoadImage("icons\\time-warp.png", 13, 13);
            _GfxTimeWarpOff      = TextureHelper.LoadImage("icons\\time-warp-x.png", 13, 13);
            _GfxAudioAlert       = TextureHelper.LoadImage("icons\\audio-alert.png", 13, 13);
            _GfxAudioAlertOff    = TextureHelper.LoadImage("icons\\audio-alert-off.png", 13, 13);
            _GfxResultsWindow    = TextureHelper.LoadImage("icons\\report.png", 13, 13);
            _GfxResultsWindowOff = TextureHelper.LoadImage("icons\\report-x.png", 13, 13);

            _availableScienceExperiments = new Dictionary <string, bool>( );

            _parent.Config.HideCompleteEventsChanged      += (s, e) => RefreshFilter(s, e);
            _parent.Config.CompleteWithoutRecoveryChanged += (s, e) => RefreshFilter(s, e);

            _parent.ScienceEventHandler.FilterUpdateEvent += (s, e) => RefreshFilter(s, e);
            _parent.ScienceEventHandler.SituationChanged  += (s, e) => UpdateSituation(s, e);
            this.Resizable = false;
            _filter.UpdateFilter( );
            _parent.Config.UiScaleChanged += OnUiScaleChange;
        }
Esempio n. 5
0
        /// <summary>
        /// Creates a new instance of the VesselExperiments class.
        /// </summary>
        public VesselExperiments(ExperimentFilter f)
        {
            _logger = new Logger(this);
            _filter = f;

            ModuleScienceExperiments = new List <ModuleScienceExperiment>();
            ModuleScienceContainers  = new List <ModuleScienceContainer>();
        }
Esempio n. 6
0
        public ScienceWindow(ScienceChecklistAddon Parent, SettingsWindow settingsWindow, HelpWindow helpWindow)
        {
            _parent         = Parent;
            _settingsWindow = settingsWindow;
            _helpWindow     = helpWindow;

            _logger       = new Logger(this);
            _defaultSize  = new Vector2(500, 400);
            _rect         = wScale(new Rect(40, 40, _defaultSize.x, _defaultSize.y));
            _defaultSize3 = new Vector2(400, 200);
            _rect3        = wScale(new Rect(40, 40, _defaultSize3.x, _defaultSize3.y));
            _scrollPos    = new Vector2();
            _filter       = new ExperimentFilter(_parent);

            _progressTexture         = TextureHelper.FromResource("ScienceChecklist.icons.scienceProgress.png", 13, 13);
            _completeTexture         = TextureHelper.FromResource("ScienceChecklist.icons.scienceComplete.png", 13, 13);
            _progressTextureCompact  = TextureHelper.FromResource("ScienceChecklist.icons.scienceProgressCompact.png", 8, 8);
            _completeTextureCompact  = TextureHelper.FromResource("ScienceChecklist.icons.scienceCompleteCompact.png", 8, 8);
            _currentSituationTexture = TextureHelper.FromResource("ScienceChecklist.icons.currentSituation.png", 25, 21);
            _currentVesselTexture    = TextureHelper.FromResource("ScienceChecklist.icons.currentVessel.png", 25, 21);
            _notCurrentVesselTexture = TextureHelper.FromResource("ScienceChecklist.icons.notCurrentVessel.png", 25, 21);
            _unlockedTexture         = TextureHelper.FromResource("ScienceChecklist.icons.unlocked.png", 25, 21);
            _allTexture         = TextureHelper.FromResource("ScienceChecklist.icons.all.png", 25, 21);
            _searchTexture      = TextureHelper.FromResource("ScienceChecklist.icons.search.png", 25, 21);
            _clearSearchTexture = TextureHelper.FromResource("ScienceChecklist.icons.clearSearch.png", 25, 21);
            _minimizeTexture    = TextureHelper.FromResource("ScienceChecklist.icons.minimize.png", 16, 16);
            _maximizeTexture    = TextureHelper.FromResource("ScienceChecklist.icons.maximize.png", 16, 16);
            _closeTexture       = TextureHelper.FromResource("ScienceChecklist.icons.close.png", 16, 16);
            _helpTexture        = TextureHelper.FromResource("ScienceChecklist.icons.help.png", 16, 16);
            _settingsTexture    = TextureHelper.FromResource("ScienceChecklist.icons.settings.png", 16, 16);

            _emptyTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
            _emptyTexture.SetPixels(new[] { Color.clear });
            _emptyTexture.Apply();

            _parent.Config.HideCompleteEventsChanged      += (s, e) => RefreshFilter(s, e);
            _parent.Config.CompleteWithoutRecoveryChanged += (s, e) => RefreshFilter(s, e);

            _parent.ScienceEventHandler.FilterUpdateEvent += (s, e) => RefreshFilter(s, e);
            _parent.ScienceEventHandler.SituationChanged  += (s, e) => UpdateSituation(s, e);

            _parent.Config.UiScaleChanged += OnUiScaleChange;
        }