@Override
	public void update(GameContainer gc, StateBasedGame sb, int delta)
			throws SlickException {

		for (MenuButton button : buttons) {
			button.update(gc, sb, delta);
		}
		
		if (playButton.isMousePressed()) {

			if (Game.app.getFPS() >= 30) {
				
				if (firstTime) {
					fillAlpha = 175;
					firstTime = false;
				}
				
			
				sb.enterState(InGameState.ID, new FadeOutTransition(Color.black,
						TRANSITION_DELAY), new FadeInTransition(Color.black,
								TRANSITION_DELAY));
				playButton.setImage(new Image("res/buttons/play.png"));
			}
		}
		
		if (settingsButton.isMousePressed()) {
			sb.enterState(SettingsState.ID, new FadeOutTransition(Color.black,
					TRANSITION_DELAY), new FadeInTransition(Color.black,
							TRANSITION_DELAY));
		}
		
		if (helpButton.isMousePressed()) {
			sb.enterState(HelpState.ID, new FadeOutTransition(Color.black,
					TRANSITION_DELAY), new FadeInTransition(Color.black,
							TRANSITION_DELAY));
		}
		
		if (exitButton.isMousePressed()) {
			System.exit(0);
		}
		
		Input input = gc.getInput();
		if (Controller.isShortcutPressed("Menu", input)) {
			sb.enterState(InGameState.ID, new FadeOutTransition(Color.black,
					TRANSITION_DELAY), new FadeInTransition(Color.black,
							TRANSITION_DELAY));
		}
		
	}