public MiniMenu(MiniMenuMode mode) { _x = (1024 - 250) / 2; _y = (768 - 75 - 75 - 30) / 2; _mode = mode; switch (mode) { case MiniMenuMode.Exit: AddButton(250, "Resume", MiniMenuButton.Cancel); AddButton(350, "Options", MiniMenuButton.Options); AddButton(450, "Exit", MiniMenuButton.Quit); break; case MiniMenuMode.SaveGame: AddButton(300, "Cancel", MiniMenuButton.Cancel); AddButton(450, "Save", MiniMenuButton.Save); break; case MiniMenuMode.ExitPrompt: AddButton(512 - 250, 350, "Exit", MiniMenuButton.Yes); AddButton(512 + 50, 350, "Cancel", MiniMenuButton.No); break; } }
/// <summary> /// Opens the minimenu. /// </summary> /// <param name="mode"></param> public void OpenMiniMenu(MiniMenuMode mode) { _activeWindow = new MiniMenu(mode); }