public void drawGrid(Graphics g) {
		if (!Settings.displayGrid) {
			return;
		}
		g.setColor(new Color(255, 255, 255, 15));
		int width = instance.getCanvasWidth();
		int height = instance.getCanvasHeight();
		int horizontalCount = width / (Main.horizontalScale != 0 ? Main.horizontalScale : 1);
		int verticalCount = height / (Main.verticalScale != 0 ? Main.verticalScale : 1);
		for (int index = 0, x = 0; index < horizontalCount + 1; index++, x += Main.horizontalScale) {
			g.drawLine(x, 0, x, height);
		}
		for (int index = 0, y = 0; index < verticalCount + 1; index++, y += Main.verticalScale) {
			g.drawLine(0, y, width, y);
		}
	}