public void mapClicked(int x, int y) {
		x = x / tileWidth;
		y = y / tileHeight;
		if (x < map.getWidth() && x >= 0 && y < map.getHeight() && y >= 0) {

			if (mapEdit.getPaintMode() == MapEdit.PAINT_NORMAL) {
				map.setTile(x, y, activeLayer, mapEdit.getSelectedTile());
				stateChanged = true;
			} else if (mapEdit.getPaintMode() == MapEdit.PAINT_FILL) {
				recursiveFlood(x, y, activeLayer,
						map.getTile(x, y, activeLayer),
						mapEdit.getSelectedTile());
			} else {
				System.out.println("Invalid paint mode");
			}
		}
	}