Esempio n. 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);
            }
        }
Esempio n. 2
0
 internal UI_ProgressBar(UIConfig.cProgressBar progressBarSettings, UIConfig.TextSettings textSettings)
 {
     config       = progressBarSettings;
     text         = new UI_Text(textSettings);
     innerTexture = UIUtils.CreateColorTexture(config.InnerColor);
     outerTexture = UIUtils.CreateColorTexture(config.OuterColor);
 }
Esempio n. 3
0
        internal UI_ProgressBar(UIConfig.cProgressBar progressBarSettings, UIConfig.TextSettings textSettings)
        {
            config = progressBarSettings;
            text   = new UI_Text(textSettings);

            innerTexture           = UIUtils.CreateColorTexture(config.InnerColor);
            innerTexture.hideFlags = HideFlags.HideAndDontSave;
            innerTexture.DontDestroyOnLoad();

            outerTexture           = UIUtils.CreateColorTexture(config.OuterColor);
            outerTexture.hideFlags = HideFlags.HideAndDontSave;
            outerTexture.DontDestroyOnLoad();

            AllElements.Add(this);
        }