Exemplo n.º 1
0
 private void EnterName_Paint(object sender, PaintEventArgs e)
 {
     e.Graphics.DrawString("Name: ", font.getFont(), new SolidBrush(Color.White), 10 + offsetX, 20 + offsetY);
     e.Graphics.DrawString("Score:  " + score.ToString(), font.getFont(), new SolidBrush(Color.White), 10 + offsetX, 50 + offsetY);
     e.Graphics.DrawImage(new Bitmap(square, new Size(30, 30)), 5, 5);
     e.Graphics.DrawImage(new Bitmap(square, new Size(30, 30)), 40, 5);
     e.Graphics.DrawImage(new Bitmap(square, new Size(30, 30)), 5, 40);
     e.Graphics.DrawImage(new Bitmap(square, new Size(30, 30)), this.Width - 45, this.Height - 65);
     e.Graphics.DrawImage(new Bitmap(square, new Size(30, 30)), this.Width - 80, this.Height - 65);
     e.Graphics.DrawImage(new Bitmap(square, new Size(30, 30)), this.Width - 45, this.Height - 100);
 }
Exemplo n.º 2
0
 private void Play_Paint(object sender, PaintEventArgs e)
 {
     e.Graphics.Clear(Color.Black);
     sMatrix.drawMatrix(e.Graphics);
     if (comboScore)
     {
         e.Graphics.DrawString(Score + sMatrix.score.ToString() + " +" + sMatrix.getComboScore.ToString(), font.getFont(), new SolidBrush(Color.Beige), offset, 10 + rows * squareWidth);
     }
     else
     {
         e.Graphics.DrawString(Score + sMatrix.score.ToString(), font.getFont(), new SolidBrush(Color.Beige), offset, 10 + rows * squareWidth);
     }
     e.Graphics.DrawString(Time + time.ToString(), font.getFont(), new SolidBrush(Color.Beige), this.Width - 152, 10 + rows * squareWidth);
     e.Graphics.DrawString(Combo + sMatrix.combo.ToString(), font.getFont(), new SolidBrush(Color.Beige), offset, 40 + rows * squareWidth);
     e.Graphics.DrawString(Squares + sMatrix.numberOfSquares.ToString(), font.getFont(), new SolidBrush(Color.Beige), this.Width - 215, 40 + rows * squareWidth);
     e.Graphics.DrawString(Weapons, font.getFont(), new SolidBrush(Color.Beige), offset, 75 + rows * squareWidth);
     bomb.drawSquare(e.Graphics);
     cut.drawSquare(e.Graphics);
     freeze.drawSquare(e.Graphics);
     mute.drawSquare(e.Graphics);
 }
Exemplo n.º 3
0
 private void Help_Paint(object sender, PaintEventArgs e)
 {
     e.Graphics.DrawImage(helpBitmap, 0, 0);
     e.Graphics.DrawString(text, font1.getFont(), new SolidBrush(Color.White), 30, 160);
     if (buttonHovered)
     {
         e.Graphics.DrawImage(backHoverBtmp, -20, this.Height - 112);
     }
     else
     {
         e.Graphics.DrawImage(backBtmp, -20, this.Height - 112);
     }
 }
        private void HighScores_Paint(object sender, PaintEventArgs e)
        {
            e.Graphics.DrawImage(scoresBitmap, 0, 0);

            if (buttonHovered)
            {
                e.Graphics.DrawImage(backHoverBtmp, 0, this.Height - 120);
            }
            else
            {
                e.Graphics.DrawImage(backBtmp, 0, this.Height - 120);
            }
            if (scores.Count != 0)
            {
                for (int i = 0; i < scores.Count; i++)
                {
                    if (i == 0)
                    {
                        e.Graphics.DrawString(" 1. " + names.ElementAt(i).ToString(), fonts.getFont(), new SolidBrush(Color.White), 73, (i * 24) + 200);
                    }
                    else
                    {
                        e.Graphics.DrawString(i + 1 + ". " + names.ElementAt(i).ToString(), fonts.getFont(), new SolidBrush(Color.White), 70, (i * 24) + 200);
                    }
                    e.Graphics.DrawString("Score: " + scores.ElementAt(i).ToString(), fonts.getFont(), new SolidBrush(Color.White), 230, (i * 24) + 200);
                }
            }
        }