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); } }
protected override void render(GTA.Graphics g) { g.DrawRectangle(Box, color); }