Beispiel #1
0
    /** Draw overlayed ui.  todo: maybe itemInfo should be part of an always present overlay state */
    public override void DoDraw()
    {
        base.DoDraw();

        // check if the game is loadeding and don't draw if we are...
        if (CurrentState is LoadingState)
        {
            return;
        }

        if (Settings.Advanced.PowerMode && (OptionsButton != null) && (!HideGUI))
        {
            CurrentState.PositionComponent(OptionsButton, 10, -10);
            OptionsButton.Update();
            OptionsButton.Draw();
        }
    }
Beispiel #2
0
        // Main draw method
        public void Draw(SpriteBatch spriteBatch)
        {
            // Draw the background
            spriteBatch.Draw(ContentHelper.GetTexture("gameBoardBackground"), new Rectangle(Point.Zero, new Point(ScaleHelper.BackBufferWidth, ScaleHelper.BackBufferHeight)), Color.Gray);

            // Draw the panel
            Rectangle drawRectangle = new Rectangle(
                new Point(widthBuffer, heightBuffer),
                new Point(ScaleHelper.ScaleWidth(pausePanel.Width), ScaleHelper.ScaleHeight(pausePanel.Height)));

            spriteBatch.Draw(pausePanel, drawRectangle, Color.PowderBlue);

            // Draw the buttons
            continueButton.Draw(spriteBatch);

            optionsButton.Draw(spriteBatch);
        }