
(Buttons to rotate the map)
And holy COW I fixed it!:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| for (int x1 = 0; x1 < TiledMap.getMapWidth(); x1 += x) { win1 = x1; for (int y1 = 0; y1 < TiledMap.getMapHeight(); y1 += x) { win2 = y1; g2d.draw3DRect(40 + x1, 40 + y1, 40, 40, true); if (mouseX > win1 && mouseX < win1 + x && mouseY > win2 && mouseY < win2 + 40) { if ((win1 > 39 && win2 > 39) && (win1 < 722 && win2 < 482)) { cont1 = true; cont2 = true; System.out.println("X: " + win1 + ", Y: " + win2); } else { cont1 = false; cont2 = false; } if (cont1 && cont2) { g2d.setColor(Color.cyan); g2d.draw3DRect(x1, y1, 40, 40, true); g2d.setColor(Color.red); g2d.draw3DRect(x1 + 40 + win1, y1 + 40 + win2, 40, 40, true); } } } } |
Here's how it looks now...
