Esempio n. 1
0
 // Draweroni
 public override void DrawGUI(SpriteBatch spriteBatch)
 {
     // Draw ze rectangles
     if (rec2.X != 0)
     {
         ShapeRenderer.FillRectangle(spriteBatch, rec1, size, Color.Black);
         ShapeRenderer.FillRectangle(spriteBatch, rec2, size, Color.Black);
         ShapeRenderer.FillRectangle(spriteBatch, rec3, size, Color.Black);
         ShapeRenderer.FillRectangle(spriteBatch, rec4, size, Color.Black);
     }
     else
     {
         ShapeRenderer.FillRectangle(spriteBatch, rec5, size2, Color.Black);
         ShapeRenderer.FillRectangle(spriteBatch, rec6, size2, Color.Black);
     }
 }
Esempio n. 2
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            Position.Y = Camera.View.Y - 60;

            // Draws the box
            ShapeRenderer.FillRectangle(
                spriteBatch,
                Position + new Vector2(-1, 0),
                size,
                0.01f,
                Color.Black
                );

            // Draws the alternatives
            for (int i = 0; i < Alternatives.Count; i++)
            {
                Color col = Color.Gray;
                if (i == CurrentAlternative)
                {
                    col = Color.White;
                }

                origin.X = Font.MeasureString(Alternatives[i].Text).X / 2;
                origin.Y = Font.MeasureString(Alternatives[i].Text).Y / 2;

                Vector2 offset = new Vector2(50 + i % 2 * 75, 25);

                spriteBatch.DrawString(
                    Font,
                    Alternatives[i].Text,
                    Position + offset,
                    col,
                    0,
                    origin,
                    1,
                    SpriteEffects.None,
                    0
                    );
            }
        }
Esempio n. 3
0
 // Draw center dot
 public void DrawCenterDot(SpriteBatch spriteBatch)
 {
     ShapeRenderer.FillRectangle(spriteBatch, Position, Vector2.One, 0, Color.Red);
 }
Esempio n. 4
0
 // Draw the box and text
 public void DrawGUI(SpriteBatch spriteBatch)
 {
     ShapeRenderer.FillRectangle(spriteBatch, position, boxSize, 0, Color.Black);
     spriteBatch.DrawString(font, displayedText, position + textOffset, Color.White);
 }
Esempio n. 5
0
        // Draws box
        public override void Draw(SpriteBatch spriteBatch)
        {
            Position.Y = Camera.View.Y - 60;

            // Draws the box
            ShapeRenderer.FillRectangle
            (
                spriteBatch,
                Position + new Vector2(-1, 0),
                size,
                0.01f,
                Color.Black
            );

            switch (textType)
            {
            case TextType.NORMAL:

                TextRenderer.DrawMixedText
                (
                    spriteBatch,
                    Font,
                    GameFonts.GahameFont,
                    (CharIndex < Text.Length) ? Text.Remove((int)CharIndex) : Text,
                    Position + offset,
                    Color.White
                );

                break;

            case TextType.SHAKING:

                TextRenderer.DrawMixedShakingText
                (
                    spriteBatch,
                    Font,
                    GameFonts.GahameFont,
                    (CharIndex < Text.Length) ? Text.Remove((int)CharIndex) : Text,
                    Position + offset,
                    .25f,
                    Color.White
                );

                break;

            case TextType.WAVING:

                TextRenderer.DrawMixedWaveText
                (
                    spriteBatch,
                    Font,
                    GameFonts.GahameFont,
                    (CharIndex < Text.Length) ? Text.Remove((int)CharIndex) : Text,
                    Position + offset,
                    .35f,
                    Color.White
                );

                break;
            }
        }
Esempio n. 6
0
 // Draw the rectnagel
 public override void DrawGUI(SpriteBatch spriteBatch)
 {
     ShapeRenderer.FillRectangle(spriteBatch, rect, new Color(0, 0, 0, alpha));
 }