public void close() {
        if (State.CLOSED == getState()) return;

        setState(State.CLOSED);
        RotateTransition rotate = new RotateTransition();
        rotate.setNode(cross);
        rotate.setToAngle(0);
        rotate.setDuration(Duration.millis(200));
        rotate.setInterpolator(Interpolator.EASE_BOTH);
        rotate.play();
        closeTimeLines[closeTimeLines.length - 1].setOnFinished(actionEvent -> {
            FadeTransition buttonFadeOut = new FadeTransition();
            buttonFadeOut.setNode(mainMenuButton);
            buttonFadeOut.setDuration(Duration.millis(100));
            buttonFadeOut.setToValue(options.getButtonAlpha());
            buttonFadeOut.play();
            buttonFadeOut.setOnFinished(event -> {
                if (options.isButtonHideOnClose()) hide();
                fireMenuEvent(new MenuEvent(this, null, MenuEvent.MENU_CLOSE_FINISHED));
            });
        });
        for (int i = 0 ; i < closeTimeLines.length ; i++) {
            closeTimeLines[i].play();
        }
        fireMenuEvent(new MenuEvent(this, null, MenuEvent.MENU_CLOSE_STARTED));
    }