private void CreateGrid() { int screenWidth = ViewportHandler.GetWidth(); int screenHeight = ViewportHandler.GetHeight(); int boxWidth = screenWidth / gridBoxesHorizontal; int boxHeight = screenHeight / gridBoxesVertical; for (int x = 0; x <= screenWidth; x += boxWidth) { lines.Add(drawingHelper.CreateLine(1, Color.White, new Vector2(x, 0), new Vector2(x, screenHeight))); } for (int y = 0; y <= screenHeight; y += boxHeight) { lines.Add(drawingHelper.CreateLine(1, Color.White, new Vector2(0, y), new Vector2(screenWidth, y))); } }