Esempio n. 1
0
        /// <summary>
        /// Load the controls of Title Menu
        /// </summary>
        private void LoadTitleMenuControls(object sender, EventArgs e)
        {
            if (titleLoaded)
            {
                Label Play = new Label();
                Play.Name        = "Play";
                Play.Text        = "PLAY";
                Play.Parent      = titleMenu.Controls["Background"];
                Play.ForeColor   = Color.DarkBlue;
                Play.Font        = new Font("Arial", 30, FontStyle.Bold);
                Play.Height      = 48;
                Play.Width       = 120;
                Play.BackColor   = Color.Transparent;
                Play.Location    = new Point(150, 210);
                Play.MouseEnter += HoverInPlayControl;
                Play.MouseLeave += HoverOutPlayControl;
                Play.Click      += ClickPlayControl;
                (titleMenu.Controls["Background"]).Controls.Add(Play);
                (titleMenu.Controls["Background"]).Controls["Play"].BringToFront();

                Label Credits = new Label();
                Credits.Name        = "Credits";
                Credits.Text        = "CREDITS";
                Credits.Parent      = titleMenu.Controls["Background"];
                Credits.ForeColor   = Color.DarkBlue;
                Credits.Font        = new Font("Arial", 30, FontStyle.Bold);
                Credits.Height      = 48;
                Credits.Width       = 200;
                Credits.BackColor   = Color.Transparent;
                Credits.Location    = new Point(150, 270);
                Credits.MouseEnter += HoverInCreditsControl;
                Credits.MouseLeave += HoverOutCreditsControl;
                (titleMenu.Controls["Background"]).Controls.Add(Credits);
                (titleMenu.Controls["Background"]).Controls["Credits"].BringToFront();

                Label Quit = new Label();
                Quit.Name        = "Quit";
                Quit.Text        = "QUIT";
                Quit.Parent      = titleMenu.Controls["Background"];
                Quit.ForeColor   = Color.DarkBlue;
                Quit.Font        = new Font("Arial", 30, FontStyle.Bold);
                Quit.Height      = 48;
                Quit.Width       = 120;
                Quit.BackColor   = Color.Transparent;
                Quit.Location    = new Point(150, 330);
                Quit.MouseEnter += HoverInQuitControl;
                Quit.MouseLeave += HoverOutQuitControl;
                Quit.Click      += ClickQuitControl;
                (titleMenu.Controls["Background"]).Controls.Add(Quit);
                (titleMenu.Controls["Background"]).Controls["Quit"].BringToFront();

                Label Version = new Label();
                Version.Name      = "Version";
                Version.Text      = "Prototype 1";
                Version.Parent    = titleMenu.Controls["Background"];
                Version.ForeColor = Color.Yellow;
                Version.Font      = new Font("Arial", 15, FontStyle.Bold);
                Version.Height    = 25;
                Version.Width     = 120;
                Version.BackColor = Color.Blue;
                Version.Location  = new Point(0, 515);
                (titleMenu.Controls["Background"]).Controls.Add(Version);
                (titleMenu.Controls["Background"]).Controls["Version"].BringToFront();

                backgroundAudio.PlayLoop();
                loadTitleMenuTimer.Stop();
            }
        }