public static DialogResult Show() { pauseDialog = new PauseDialog(); pauseDialog.FormBorderStyle = FormBorderStyle.None; pauseDialog.StartPosition = FormStartPosition.CenterScreen; pauseDialog.Size = new Size(ScreenControl.controlWidth, ScreenControl.controlHeight); pauseDialog.BackColor = Color.DarkGray; continueButton = new Button(); continueButton.Location = new Point(10, pauseDialog.Height / 2 - ScreenControl.buttonSize.Height - 10); continueButton.Text = "Continue"; continueButton.Click += ButtonClick; continueButton.Enter += ScreenControl.buttonEnter; continueButton.Leave += ScreenControl.buttonLeave; pauseDialog.Controls.Add(continueButton); exitButton = new Button(); exitButton.Location = new Point(10, pauseDialog.Height / 2 + 10); exitButton.Text = "Exit Game"; exitButton.Click += ButtonClick; exitButton.Enter += ScreenControl.buttonEnter; exitButton.Leave += ScreenControl.buttonLeave; pauseDialog.Controls.Add(exitButton); ScreenControl.setComponentValues(pauseDialog); pauseDialog.ShowDialog(); return buttonResult; }
public static DialogResult Show() { pauseDialog = new PauseDialog(); pauseDialog.FormBorderStyle = FormBorderStyle.None; pauseDialog.StartPosition = FormStartPosition.CenterScreen; pauseDialog.Size = new Size(ScreenControl.controlWidth, ScreenControl.controlHeight); pauseDialog.BackColor = Color.DarkGray; continueButton = new Button(); continueButton.Location = new Point(10, pauseDialog.Height / 2 - ScreenControl.buttonSize.Height - 10); continueButton.Text = "Continue"; continueButton.Click += ButtonClick; continueButton.Enter += ScreenControl.buttonEnter; continueButton.Leave += ScreenControl.buttonLeave; pauseDialog.Controls.Add(continueButton); exitButton = new Button(); exitButton.Location = new Point(10, pauseDialog.Height / 2 + 10); exitButton.Text = "Exit Game"; exitButton.Click += ButtonClick; exitButton.Enter += ScreenControl.buttonEnter; exitButton.Leave += ScreenControl.buttonLeave; pauseDialog.Controls.Add(exitButton); ScreenControl.setComponentValues(pauseDialog); pauseDialog.ShowDialog(); return(buttonResult); }
public static DialogResult Show() { pauseDialog = new PauseDialog(); pauseDialog.FormBorderStyle = FormBorderStyle.None; pauseDialog.StartPosition = FormStartPosition.CenterScreen; pauseDialog.Size = new Size(ScreenControl.controlWidth, ScreenControl.controlHeight); pauseDialog.BackColor = Color.FromArgb(0, 9, 36); continueButton = new Button(); continueButton.Location = new Point(10, pauseDialog.Height / 2 - ScreenControl.buttonSize.Height - 10); continueButton.Text = "Play"; continueButton.ForeColor = Color.FromArgb(0, 255, 247); continueButton.FlatAppearance.BorderSize = 4; continueButton.FlatAppearance.BorderColor = Color.FromArgb(0, 68, 66); continueButton.BackColor = Color.FromArgb(16, 16, 16); continueButton.Click += ButtonClick; continueButton.Enter += ScreenControl.buttonEnter; continueButton.Leave += ScreenControl.buttonLeave; pauseDialog.Controls.Add(continueButton); exitButton = new Button(); exitButton.Location = new Point(10, pauseDialog.Height / 2 + 10); exitButton.Text = "Exit"; exitButton.ForeColor = Color.FromArgb(0, 255, 247); exitButton.FlatAppearance.BorderSize = 4; exitButton.FlatAppearance.BorderColor = Color.FromArgb(0, 68, 66); exitButton.BackColor = Color.FromArgb(16, 16, 16); exitButton.Click += ButtonClick; exitButton.Enter += ScreenControl.buttonEnter; exitButton.Leave += ScreenControl.buttonLeave; pauseDialog.Controls.Add(exitButton); ScreenControl.setComponentValues(pauseDialog); pauseDialog.ShowDialog(); return(buttonResult); }