public void mouseClicked(int x, int y) {
		if(parent.activeBrush < 0){
			if(!fill) drawTiles(currentLayer - 1, x, y);
			else fillTiles(currentLayer- 1, x, y);
		
			backUpTiles();
		}

		else{
			int tileSize = parent.tilePanel.getTileSize();
			int tx = 0;
			int ty = 0;
			if(x > 0) tx = x/tileSize;
			if(y > 0) ty = y/tileSize;
			parent.xmlList.xmlPanels.get(parent.activeBrush).onMapCLick(tx, ty);
			revalidate();
		}
	}