void ShowGameFolderStage() { // Set temporary background texture if (titleTexture != null) { titleTexture.filterMode = DaggerfallUI.Instance.GlobalFilterMode; ParentPanel.BackgroundTexture = titleTexture; ParentPanel.BackgroundTextureLayout = BackgroundLayout.ScaleToFit; } // Setup panel browserPanel.BackgroundColor = backgroundColor; browserPanel.HorizontalAlignment = HorizontalAlignment.Center; browserPanel.VerticalAlignment = VerticalAlignment.Middle; browserPanel.Size = browserPanelSize; browserPanel.Outline.Enabled = true; NativePanel.Components.Add(browserPanel); // Setup screen text MultiFormatTextLabel screen = new MultiFormatTextLabel(); screen.HorizontalAlignment = HorizontalAlignment.Center; screen.Position = new Vector2(0, 10); screen.TextAlignment = HorizontalAlignment.Center; screen.SetText(Resources.Load<TextAsset>("Screens/WelcomeScreen")); browserPanel.Components.Add(screen); // Setup folder browser browser.Position = new Vector2(4, 30); browser.Size = new Vector2(250, 104); browser.HorizontalAlignment = HorizontalAlignment.Center; browser.ConfirmEnabled = false; browser.OnConfirmPath += Browser_OnConfirmPath; browser.OnPathChanged += Browser_OnPathChanged; browserPanel.Components.Add(browser); // Add version number TextLabel versionLabel = new TextLabel(); versionLabel.Position = new Vector2(0, 1); versionLabel.HorizontalAlignment = HorizontalAlignment.Right; versionLabel.ShadowPosition = Vector2.zero; versionLabel.TextColor = Color.gray; versionLabel.Text = VersionInfo.DaggerfallUnityVersion; browserPanel.Components.Add(versionLabel); // Add help text helpLabel.Position = new Vector2(0, 145); helpLabel.HorizontalAlignment = HorizontalAlignment.Center; helpLabel.ShadowPosition = Vector2.zero; helpLabel.Text = findArena2Tip; browserPanel.Components.Add(helpLabel); }
protected override void Setup() { // Load native texture nativeTexture = DaggerfallUI.GetTextureFromImg(nativeImgName); if (!nativeTexture) throw new Exception("CreateCharReflexSelect: Could not load native texture."); // Setup native panel background NativePanel.BackgroundTexture = nativeTexture; // Setup info panel Panel infoPanel = new Panel(); DaggerfallUI.Instance.SetDaggerfallPopupStyle(DaggerfallUI.PopupStyle.Parchment, infoPanel); NativePanel.Components.Add(infoPanel); infoPanel.HorizontalAlignment = HorizontalAlignment.Center; infoPanel.Position = new Vector2(0, 15); // Setup info text MultiFormatTextLabel infoText = new MultiFormatTextLabel(); infoPanel.Components.Add(infoText); infoText.SetText(DaggerfallUnity.Instance.TextProvider.GetRSCTokens(strPlayerReflexesDetermine)); infoText.HorizontalAlignment = HorizontalAlignment.Center; infoText.VerticalAlignment = VerticalAlignment.Middle; infoPanel.Size = infoText.Size; // Setup button picker reflexPicker = new ReflexPicker(); NativePanel.Components.Add(reflexPicker); reflexPicker.Position = new Vector2(127, 148f); // Add "OK" button Button okButton = DaggerfallUI.AddButton(new Rect(263, 172, 39, 22), NativePanel); okButton.OnMouseClick += OkButton_OnMouseClick; }