protected override void render(GTA.Graphics g)
 {
     if (type == DrawType.Rectangle)
     {
         g.DrawText(text, new RectangleF(position.X, position.Y, width, height), alignment, color, font);
     }
     else
     {
         g.DrawText(text, position.X, position.Y, color, font);
     }
 }
Beispiel #2
0
 public void drawCross(GTA.Graphics e)
 {
     if (inCameraMode)
     {
         if (zoomIn)
         {
             zoom -= 10.0f;
             if (zoom < 50.0f)
             {
                 zoom = 50.0f;
             }
         }
         else if (zoomOut)
         {
             zoom += 10.0f;
             if (zoom > 2000.0f)
             {
                 zoom = 2000.0f;
             }
         }
         float z = getPercentageZoom();
         if (direction == MoveDirection.Left)
         {
             currentPosition -= new Vector3(30 * z, 0, 0);
         }
         if (direction == MoveDirection.Right)
         {
             currentPosition += new Vector3(30 * z, 0, 0);
         }
         if (direction == MoveDirection.Up)
         {
             currentPosition += new Vector3(0, 30 * z, 0);
         }
         if (direction == MoveDirection.Down)
         {
             currentPosition -= new Vector3(0, 30 * z, 0);
         }
         var horizontal = new RectangleF(0, Game.Resolution.Height / 2 - 2, Game.Resolution.Width, 4);
         var vertical   = new RectangleF(Game.Resolution.Width / 2 - 2, 0, 4, Game.Resolution.Height);
         var color      = Color.FromArgb(70, 0, 0, 0);
         e.DrawRectangle(horizontal, color);
         e.DrawRectangle(vertical, color);
     }
 }
Beispiel #3
0
 protected override void render(GTA.Graphics g)
 {
     g.DrawSprite(texture, new RectangleF(position.X, position.Y, width, height));
 }