private void MakeGui() { string scoreText = SCORE_TEXT + totalScore.ToString(); GuiLabel scoreLabel = new GuiLabel(scoreText, (SpriteFont)game.SharedContent[Consts.RESOURCE_FONT]); Point scorePosition = new Point(Consts.SCREEN_HORIZ_CENTER - scoreLabel.Rectangle.Width / 2, Consts.SCREEN_VERT_CENTER - scoreLabel.Rectangle.Height / 2); scoreLabel.SetRelativePosition(scorePosition); AddElement(LABEL_SCORE_ID, scoreLabel); GuiLabel gameOverLabel = new GuiLabel(GAME_OVER_TEXT, (SpriteFont)game.SharedContent[Consts.RESOURCE_FONT]); Point labelPosition = new Point(Consts.SCREEN_HORIZ_CENTER - gameOverLabel.Rectangle.Width / 2, scorePosition.Y - gameOverLabel.Rectangle.Height - 5); gameOverLabel.SetRelativePosition(labelPosition); AddElement(LABEL_GAME_OVER_ID, gameOverLabel); GuiLabel buttonLabel = new GuiLabel(OK_TEXT, (SpriteFont)game.SharedContent[Consts.RESOURCE_FONT]); Point buttonSize = new Point(200, 50); Point buttonPosition = new Point(Consts.SCREEN_HORIZ_CENTER - buttonSize.X / 2, scoreLabel.Rectangle.Bottom + 5); GuiButton okButton = new GuiButton(new Rectangle(buttonPosition, buttonSize), Consts.BUTTON_NORMAL, Consts.BUTTON_HOVER, Consts.BUTTON_PRESSED, buttonLabel); okButton.OnClick += RetryAction; AddElement(BUTTON_OK_ID, okButton); }