public void update(GameContainer gc, StateBasedGame sb, int delta) {
		for (Component component : getComponents()) {
			component.update(gc, sb, delta);
		}
		
		int mousePosX = Mouse.getX();
		int mousePosY = Math.abs(Mouse.getY() - Game.app.getHeight());
		Input input = gc.getInput();
		
		if ( mousePosX > getPosition().getX() && mousePosX < getPosition().getX() + image.getWidth() 
				&& mousePosY > getPosition().getY() && mousePosY < getPosition().getY() + image.getHeight() ) { // cursor is inside button
			if (input.isMousePressed(0)) {
				mousePressed = true;
				input.clearKeyPressedRecord();
				input.clearMousePressedRecord();
			} else {
				mousePressed = false;
			}
		} 
	}