/// <summary> /// go to the installation step with the specified index (if it exists of cause :)) /// </summary> /// <param name="idx">Index.</param> private void GotoInstallationStep(int idx) { if (idx > 0 && idx < Enum.GetNames(typeof(VTextInstallationSteps)).Length) { _logMessage = string.Empty; // reset the log message CurrentInstallationStep = (VTextInstallationSteps)idx; } }
/// <summary> /// do initial stuff here /// </summary> void OnEnable() { _vtextLogo = Resources.Load("Images/VTextLogo") as Texture; _finishLogo = Resources.Load("Images/Setup/Creativity") as Texture; _installationStarted = false; // map the current installation step to a readable string // if you miss one then the value of the enum is simply converted to string _installationStepToLabelMap[VTextInstallationSteps.Welcome] = "Welcome"; _installationStepToLabelMap[VTextInstallationSteps.LegalInformations] = "Legal informations"; _installationStepToLabelMap[VTextInstallationSteps.Installation] = "Install"; _installationStepToLabelMap[VTextInstallationSteps.InstallFonts] = "Install fonts"; _installationStepToLabelMap[VTextInstallationSteps.Finish] = "Congratulations"; // setup the style for the texts for the current installation step if (EditorGUIUtility.isProSkin) { _currentInstallationStepTextStyle.normal.textColor = new Color(0.8f, 0.8f, 0.8f, 1.0f); } else { _currentInstallationStepTextStyle.normal.textColor = Color.black; } _currentInstallationStepTextStyle.wordWrap = true; _currentInstallationStepTextStyle.richText = true; // setup the style for the headers of the current installation step _currentInstallationStepHeaderTextStyle.alignment = TextAnchor.MiddleCenter; _currentInstallationStepHeaderTextStyle.fontSize = 20; _currentInstallationStepHeaderTextStyle.fontStyle = FontStyle.Bold; // setup slideshow images _slideShowImages = new List <Texture>() { Resources.Load("Images/Setup/Creativity") as Texture, Resources.Load("Images/Setup/SlideShow/image01") as Texture, Resources.Load("Images/Setup/SlideShow/image02") as Texture, Resources.Load("Images/Setup/SlideShow/image03") as Texture, Resources.Load("Images/Setup/SlideShow/image04") as Texture, Resources.Load("Images/Setup/SlideShow/image05") as Texture, Resources.Load("Images/Setup/SlideShow/image06") as Texture, }; _slideShowStartTime = (float)EditorApplication.timeSinceStartup; CurrentInstallationStep = VTextInstallationSteps.Welcome; }