示例#1
0
    /// <summary>
    /// Render the button
    /// </summary>
    /// <param name="renderTarget">The RenderTarget the button
    /// should render to</param>
    public void Render(RenderTarget renderTarget)
    {
        // Render the primitive shape of the button
        renderTarget.Draw(shape);

        // Render the text inside the button
        text.Render(renderTarget);
    }
示例#2
0
    public override void Render(RenderTarget renderTarget)
    {
        // Render the title
        title.Render(renderTarget);

        // Render all the menu buttons
        foreach (var button in menuButtons)
        {
            button.Value.Render(renderTarget);
        }
    }
    public override void Render(RenderTarget renderTarget)
    {
        // Render the title
        title.Render(renderTarget);

        // Render the back button
        backButton.Render(renderTarget);

        // Render the left paddle selector
        leftPaddleSelector.Render(renderTarget);

        // Render the left paddle selector
        rightPaddleSelector.Render(renderTarget);
    }
示例#4
0
    /// <summary>
    /// Render the screen
    /// </summary>
    /// <param name="renderTarget">The RenderTarget the screen should be
    /// rendered to</param>
    public override void Render(RenderTarget renderTarget)
    {
        // Render the titles
        title.Render(renderTarget);
        changeLanguageTitle.Render(renderTarget);

        // Render the language buttons
        foreach (UIButton button in languageButtons)
        {
            button.Render(renderTarget);
        }

        // Render the back button
        backButton.Render(renderTarget);
    }
示例#5
0
    /// <summary>
    /// Render the selector
    /// </summary>
    /// <param name="renderTarget">The RenderTarget the selector should
    /// render to</param>
    public void Render(RenderTarget renderTarget)
    {
        // Apply the current selected skin
        paddlePreview.FillColor = currentSkin.Color;

        // Render the paddle preview
        renderTarget.Draw(paddlePreview);

        // Render the skinChangeLeft button
        skinChangeLeft.Render(renderTarget);

        // Render the skinChangeRight button
        skinChangeRight.Render(renderTarget);

        // Render the skin name
        skinName.Render(renderTarget);
    }
    /// <summary>
    /// Render the game
    /// </summary>
    /// <param name="renderTarget">The RenderTarget the game should
    /// render to</param>
    public void Render(RenderTarget renderTarget)
    {
        // Render the left paddle
        RenderLeftPaddle(renderTarget);

        // Render the right paddle
        RenderRightPaddle(renderTarget);

        // Set the position of the ball and render it
        ball.Position = Model.Ball.Position;
        renderTarget.Draw(ball);

        // Render the left score
        renderTarget.Draw(leftSideScore);

        // Render the right score
        renderTarget.Draw(rightSideScore);

        // Update the scores
        // TODO(patrik): Maybe we should not do this every frame?!?!??
        UpdateScore();

        helperMessage.Render(renderTarget);
    }