@Override
	public void mousePressed(MouseEvent me) {
		this.requestFocus();
		int x = me.getX() / scale;
		int y = me.getY() / scale;
		
		hp.setMouseClick(new Vector3f(x,y,0));
		
		Color c = null;
		
		if(SwingUtilities.isRightMouseButton(me)) {
			c = bg;
		} else if(SwingUtilities.isLeftMouseButton(me)) {
			c = fg;
		}
		
		if(curTool == TOOL_PENCIL) {
			hp.color(c.getRGB(), x, y);
		} else if(curTool == TOOL_FILLER) {
			hp.fill(c.getRGB(), x, y);
		} else if(curTool == TOOL_CHOOSER) {
			if(SwingUtilities.isRightMouseButton(me)) {
				bg = hp.getColorAt(x, y);
			} else if(SwingUtilities.isLeftMouseButton(me)) {
				fg = hp.getColorAt(x, y);
			}
			hp.setColor(fg.getRGB());
			this.setTool(lastTool);
		}
		view.updateHeightmap(hp.getTexture());
	}