Пример #1
0
        internal static void Init()
        {
            TextFont    = Resources.GetBuiltinResource <Font>("Arial.ttf");
            Background  = new Objects.UI_Background(UIConfig.Background);
            VersionText = new Objects.UI_Text(UIConfig.VersionText);
            ProgressBar = new Objects.UI_ProgressBar(UIConfig.ProgressBar, UIConfig.ProgressText);

            if (UIConfig.LogoImage.ScanForCustomImage)
            {
                LogoImage = LoadImage(UIConfig.LogoImage, "Logo");
            }
            if (LogoImage == null)
            {
                LogoImage = new Objects.UI_Image(UIConfig.LogoImage, (MelonLaunchOptions.Console.Mode == MelonLaunchOptions.Console.DisplayMode.LEMON)
                        ? Properties.Resources.Logo_Lemon
                        : Properties.Resources.Logo_Melon);
            }

            if (UIConfig.LoadingImage.ScanForCustomImage)
            {
                LoadingImage = LoadImage(UIConfig.LoadingImage, "Loading");
            }
            if (LoadingImage == null)
            {
                LoadingImage = new Objects.UI_AnimatedImage(UIConfig.LoadingImage, (MelonLaunchOptions.Console.Mode == MelonLaunchOptions.Console.DisplayMode.LEMON)
                        ? Properties.Resources.Loading_Lemon
                        : Properties.Resources.Loading_Melon);
            }
        }
Пример #2
0
        internal UI_Background(UIConfig.cBackground backgroundSettings)
        {
            config = backgroundSettings;
            image  = UIUtils.LoadImage(config, "Background");

            solidTexture           = UIUtils.CreateColorTexture(config.SolidColor);
            solidTexture.hideFlags = HideFlags.HideAndDontSave;
            solidTexture.DontDestroyOnLoad();
            AllElements.Add(this);
        }
Пример #3
0
 internal UI_Background(UIConfig.cBackground backgroundSettings)
 {
     config       = backgroundSettings;
     solidTexture = UIUtils.CreateColorTexture(config.SolidColor);
     image        = UIStyleValues.LoadImage(config, "Background");
 }