public void Draw() { SystemMain.GameSpriteBatch.Begin(); _menu.Draw(); //spriteBatch.Draw(textures[1], new Rectangle(0, 0, SystemMain.Width, SystemMain.Height), Color.White); //SystemMain.DrawHelper.DrawSelection(new[] { textures[0], textures[64], textures[65] }, SystemMain.DrawHelper.GetDrawLocations(_menuText)[_choice], (int)(Math.Ceiling(fonts[1].MeasureString(_menuText[_choice]).X))); // draw the menu title //SystemMain.DrawHelper.DrawTitleCentered(fonts[2], "Score Viewer"); //SystemMain.DrawHelper.DrawHelpBox(); //SystemMain.DrawHelper.DrawMenu(_menuText, fonts[1]); // draw the background //draw te selection box //spriteBatch.Draw(textures[0], new Vector2(75, 175 + (150 * _choice)), Color.White); //draw the title //spriteBatch.DrawString(fonts[0], "Score Viewer", new Vector2(250, 100), Color.Black); //draw the menu items //spriteBatch.DrawString(fonts[0], "View Quiz Scores (NYI)", new Vector2(100, 200), Color.Black); //spriteBatch.DrawString(fonts[0], "View Game Scores (NYI)", new Vector2(100, 350), Color.Black); //spriteBatch.DrawString(fonts[0], "Back", new Vector2(100, 500), Color.Black); SystemMain.GameSpriteBatch.End(); }
/// <summary> /// Draw /// /// This method is called in the main systems draw method. This method draws to the screen everything that makes up this screen. /// </summary> /// <param name="spriteBatch"> the object needed to draw things in XNA</param> /// <param name="fonts"> a list of fonts that cn be used in this screen</param> /// <param name="textures"> a list of textures that can be used to draw this screens</param> #region draw public void Draw() { SystemMain.GameSpriteBatch.Begin(); _menu.Draw(); SystemMain.Drawing.DrawHelpers(); SystemMain.GameSpriteBatch.End(); }
public void Draw() { SystemMain.GameSpriteBatch.Begin(); _menu.Draw(); //spriteBatch.Draw(textures[1], new Rectangle(0, 0, SystemMain.Width, SystemMain.Height), Color.White); // draw the box //var widthOfCurrentString = (int)(Math.Ceiling(_currentFont.MeasureString(_menuText[_choice]).X)); //var menuText = new List<String>(); //foreach (var q in _currentQuestionAnswers) //{ // menuText.Add(q.ToString()); //} //SystemMain.DrawHelper.DrawSelection(new[] { textures[0], textures[64], textures[65] }, SystemMain.DrawHelper.GetDrawLocations(menuText)[_choice], (int)(Math.Ceiling(fonts[1].MeasureString(menuText[_choice]).X))); // draw the menu title //SystemMain.DrawHelper.DrawTitleCentered(fonts[2], _currentQuiz.GetTitle()); //SystemMain.DrawHelper.DrawSubTitleCentered(fonts[1], _currentQuestion.GetTitle()); //draw the menu options //SystemMain.DrawHelper.DrawMenu(menuText, fonts[1]); var horizontalOffset = 800; SystemMain.GameSpriteBatch.DrawString(SystemMain.FontPackage["Main"], "% Done: " + _currentQuiz.GetPercentDone(), new Vector2(horizontalOffset, 400), Color.White); SystemMain.GameSpriteBatch.DrawString(SystemMain.FontPackage["Main"], "Questions Left: " + _currentQuiz.GetQuestionsLeft(), new Vector2(horizontalOffset, 450), Color.White); SystemMain.GameSpriteBatch.DrawString(SystemMain.FontPackage["Main"], "Total Questions: " + _currentQuiz.GetTotalQuestionCount(), new Vector2(horizontalOffset, 500), Color.White); SystemMain.GameSpriteBatch.DrawString(SystemMain.FontPackage["Main"], "Current Score: " + _currentQuizScore.Percentage, new Vector2(horizontalOffset, 550), Color.White); SystemMain.Drawing.DrawHelpers(); SystemMain.GameSpriteBatch.End(); }
public void Draw() { SystemMain.GameSpriteBatch.Begin(); SystemMain.GameSpriteBatch.DrawString(SystemMain.FontPackage["Main"], Game, new Vector2(100, 100), Color.White); _menu.Draw(); SystemMain.Drawing.DrawHelpers(); SystemMain.GameSpriteBatch.End(); }