public override void Initialize()
        {
            base.Initialize();

            Name                    = "DarkeningPanel";
            BorderColor             = UISettings.ActiveSettings.PanelBorderColor;
            BackgroundTexture       = AssetLoader.CreateTexture(new Color(0, 0, 0, 128), 1, 1);
            PanelBackgroundDrawMode = PanelBackgroundImageDrawMode.STRETCHED;
            Alpha                   = 1.0f;

            CampaignSelector = new CampaignSelector(WindowManager, discordHandler);
            AddChild(CampaignSelector);

            GameLoadingWindow = new GameLoadingWindow(WindowManager, discordHandler);
            AddChild(GameLoadingWindow);

            StatisticsWindow = new StatisticsWindow(WindowManager);
            AddChild(StatisticsWindow);

            UpdateQueryWindow = new UpdateQueryWindow(WindowManager);
            AddChild(UpdateQueryWindow);

            UpdateWindow = new UpdateWindow(WindowManager);
            AddChild(UpdateWindow);

            ExtrasWindow = new ExtrasWindow(WindowManager);
            AddChild(ExtrasWindow);

            foreach (XNAControl child in Children)
            {
                child.Visible         = false;
                child.Enabled         = false;
                child.EnabledChanged += Child_EnabledChanged;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Called when the user has declined an update.
        /// </summary>
        private void UpdateQueryWindow_UpdateDeclined(object sender, EventArgs e)
        {
            UpdateQueryWindow uqw = (UpdateQueryWindow)sender;

            innerPanel.Hide();
            lblUpdateStatus.Text          = "An update is available, click to install.";
            lblUpdateStatus.Enabled       = true;
            lblUpdateStatus.DrawUnderline = true;
        }