public void userSelectedItem(ButtonMenuItem menuItem) { if (!isItemSelected) { switch (menuItem.name) { case "NEW GAME": // Tell the game flow class we want to start a new game lhg.MyGameFlow.startNewGame(); break; case "CONTINUE GAME": lhg.MyGameFlow.continueGame(); break; case "OPTIONS": lhg.MyGameFlow.showOptions(); break; case "QUIT": lhg.MyGameFlow.quitGame(); break; } isItemSelected = true; } }
public void SetMenuItems(string[] items) { menuItems.Clear(); height = 0; foreach (string item in items) { ButtonMenuItem menuItem = new ButtonMenuItem(); menuItem.name = item; height += spacer; height += buttonImage.Height; menuItems.Add(menuItem); } }