public void ClearDrawVariables()
 {
     /*_debugTab.Clear();
      * _apparelTab.Clear();
      * _raceTab.Clear();
      * _generalTab.Clear();
      * _combatTab.Clear();
      * _hediffTab.Clear();
      * initialised = false;*/
     _debugTab      = null;
     _apparelTab    = null;
     _raceTab       = null;
     _generalTab    = null;
     _combatTab     = null;
     _hediffTab     = null;
     _isWindowSetup = false;
 }
        private void InitialiseWindow(Rect inRect)
        {
            _tabsList.Clear();

            if (_generalTab == null)
            {
                _generalTab = new GeneralTab();
            }
            _tabsList.Add(
                new TabRecord(
                    "NVGeneralTab".Translate(),
                    delegate
            {
                _tab = Tab.General;
            },
                    () => _tab == Tab.General
                    )
                );


            if (_combatTab == null)
            {
                _combatTab = new CombatTab();
            }
            _tabsList.Add(
                new TabRecord(
                    "NVCombat".Translate(),
                    delegate
            {
                _tab = Tab.Combat;
            },
                    () => _tab == Tab.Combat
                    )
                );

            if (_raceTab == null)
            {
                _raceTab = new RaceTab();
            }
            _tabsList.Add(
                new TabRecord(
                    "NVRaces".Translate(),
                    delegate
            {
                _tab = Tab.Races;
            },
                    () => _tab == Tab.Races
                    )
                );


            if (_apparelTab == null)
            {
                _apparelTab = new ApparelTab();
            }
            _tabsList.Add(
                new TabRecord(
                    "NVApparel".Translate(),
                    delegate
            {
                _tab = Tab.Apparel;
            },
                    () => _tab == Tab.Apparel
                    )
                );

            if (_hediffTab == null)
            {
                _hediffTab = new HediffTab();
            }
            _tabsList.Add(
                new TabRecord(
                    "NVHediffs".Translate(),
                    delegate
            {
                _tab = Tab.Bionics;
            },
                    () => _tab == Tab.Bionics
                    )
                );

            if (Prefs.DevMode)
            {
                if (_debugTab == null)
                {
                    _debugTab = new DebugTab();
                }
                _tabsList.Add(
                    new TabRecord(
                        "NVDebugTab".Translate(),
                        delegate
                {
                    _tab = Tab.Debug;
                },
                        () => _tab == Tab.Debug
                        )
                    );
            }

            Cache.Init();

            inRect.yMin += 32f;
            menuRect     = inRect;
            tabRect      = inRect.ContractedBy(17f);
        }