private void twoPlayersButton_Click(object sender, EventArgs e) { GameScreen.RemoveThis(this); GameScreen.StartGame(2); }
private void highScoresButton_Click(object sender, EventArgs e) { GameScreen.RemoveThis(this); GameScreen.LoadHighScoresScreen(); }
private void EnterScore_KeyUp(object sender, KeyEventArgs e) { if (newName.Length < 3) { labels[currentIndex].BackColor = formColor; labels[currentIndex].ForeColor = textColor; #region set active button or select letter switch (e.KeyCode) { case Keys.Down: if (currentIndex > 19) { currentIndex -= 20; } else { currentIndex += 10; } break; case Keys.Up: if (currentIndex < 10) { currentIndex += 20; } else { currentIndex -= 10; } break; case Keys.Right: if (currentIndex == 9 || currentIndex == 19 || currentIndex == 29) { currentIndex -= 9; } else { currentIndex++; } break; case Keys.Left: if (currentIndex == 0 || currentIndex == 10 || currentIndex == 20) { currentIndex += 9; } else { currentIndex--; } break; case Keys.Space: if (charSelect == 1) { nameChar1.Text = labels[currentIndex].Text; newName += labels[currentIndex].Text; charSelect++; } else if (charSelect == 2) { nameChar2.Text = labels[currentIndex].Text; newName += labels[currentIndex].Text; charSelect++; } else { nameChar3.Text = labels[currentIndex].Text; newName += labels[currentIndex].Text; GameScreen.RemoveThis(this); GameScreen.LoadThanksScreen(); } break; default: break; } #endregion labels[currentIndex].BackColor = textColor; labels[currentIndex].ForeColor = formColor; } }
private void backToMenuButton_Click(object sender, EventArgs e) { GameScreen.RemoveThis(this); GameScreen.LoadMenuScreen(); }
private void ThanksScreen_KeyDown(object sender, KeyEventArgs e) { GameScreen.RemoveThis(this); GameScreen.LoadMenuScreen(); }
private void menuButton_Click(object sender, EventArgs e) { GameScreen.RemoveThis(this); GameScreen.LoadMenuScreen(); GameScreen.thisScreen.InitializeValues(); }
private void continueButton_Click(object sender, EventArgs e) { GameScreen.RemoveThis(this); GameScreen.StartGame(GameScreen.thisScreen.playerNumber); }