예제 #1
0
        public static void switchTheme(object osObject, OSTheme theme)
        {
            OS os = (OS)osObject;

            if (theme == OSTheme.Custom)
            {
                string backgroundImageLoadPath = ThemeManager.customBackgroundImageLoadPath;
                ThemeManager.switchTheme((object)os, OSTheme.HacknetBlue);
                ThemeManager.customBackgroundImageLoadPath = backgroundImageLoadPath;
                ThemeManager.switchThemeLayout(os, ThemeManager.LastLoadedCustomTheme.GetThemeForLayout());
                ThemeManager.loadCustomThemeBackground(os, ThemeManager.LastLoadedCustomTheme.backgroundImagePath);
                ThemeManager.LastLoadedCustomTheme.LoadIntoOS((object)os);
            }
            else
            {
                ThemeManager.switchThemeColors(os, theme);
                ThemeManager.loadThemeBackground(os, theme);
                ThemeManager.switchThemeLayout(os, theme);
            }
            ThemeManager.currentTheme = theme;
            os.RefreshTheme();
        }