private static void ResetDoDefault(ModConfiguration config)
        {
            var template = new ModConfiguration();

            config.BackgroundColor = template.BackgroundColor;
            BgTexture.SetPixel(0, 0, config.BackgroundColor);
            BgTexture.Apply();

            config.TitleBarColor = template.TitleBarColor;
            MoveNormalTexture.SetPixel(0, 0, config.TitleBarColor);
            MoveNormalTexture.Apply();

            MoveHoverTexture.SetPixel(0, 0, config.TitleBarColor * 1.2f);
            MoveHoverTexture.Apply();

            config.TitleBarTextColor = template.TitleBarTextColor;

            config.GameObjectColor        = template.GameObjectColor;
            config.EnabledComponentColor  = template.EnabledComponentColor;
            config.DisabledComponentColor = template.DisabledComponentColor;
            config.SelectedComponentColor = template.SelectedComponentColor;
            config.NameColor       = template.NameColor;
            config.TypeColor       = template.TypeColor;
            config.ModifierColor   = template.ModifierColor;
            config.MemberTypeColor = template.MemberTypeColor;
            config.ValueColor      = template.ValueColor;
            config.FontName        = template.FontName;
            config.FontSize        = template.FontSize;
        }
Example #2
0
        private void LoadConfig()
        {
            Config = ModConfiguration.Deserialize(ConfigPath);
            if (Config == null)
            {
                Config = new ModConfiguration();
                SaveConfig();
            }

            console?.MoveResize(Config.ConsoleRect);
            Watches.MoveResize(Config.WatchesRect);
            SceneExplorer.MoveResize(Config.SceneExplorerRect);
            scriptEditor.ReloadProjectWorkspace();
        }