package sk.tuke.gamedev.iddqd.tukequest.screens;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.graphics.*;
import com.badlogic.gdx.physics.box2d.World;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.ImageButton;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
import com.badlogic.gdx.utils.viewport.FitViewport;
import com.badlogic.gdx.utils.viewport.ScreenViewport;
import com.badlogic.gdx.utils.viewport.Viewport;
import sk.tuke.gamedev.iddqd.tukequest.TukeQuestGame;
import sk.tuke.gamedev.iddqd.tukequest.actors.game.MenuBackground;
import sk.tuke.gamedev.iddqd.tukequest.visual.SimpleButton;

public class MenuScreen extends AbstractScreen {

    private TukeQuestGame game;
    private Stage stage;

    public MenuScreen(TukeQuestGame game) {
        super(game, TukeQuestGame.manager.get("audio/music/backgroundmusic.mp3", Music.class));
        this.game = game;
    }

    @Override
    protected Camera initCamera() {
        return new OrthographicCamera();
    }

    @Override
    protected Viewport initViewport(Camera camera) {
        return new FitViewport(TukeQuestGame.SCREEN_WIDTH, TukeQuestGame.SCREEN_HEIGHT, camera);
    }

    @Override
    protected World initWorld() {
        return null;
    }

    @Override
    public void show() {
        super.show();

        addActor(new MenuBackground());

        ImageButton startBtn = new SimpleButton("StartBtn.png").getButton();
        ImageButton exitBtn = new SimpleButton("ExitBtn.png").getButton();

        stage = new Stage(new ScreenViewport());

        Table menuTable = new Table();
        menuTable.add(startBtn).expandX().center().padTop(80).row(); //padding because of main logo
        menuTable.add(exitBtn).expandX().center().padTop(10).row();
        menuTable.setFillParent(true);
        stage.addActor(menuTable);

        Gdx.input.setInputProcessor(stage);

        startBtn.addListener(new ClickListener() {
            @Override
            public void clicked(InputEvent event, float x, float y) {
                game.setScreen(new GameScreen(game));
                stage.dispose();
            }
        });

        exitBtn.addListener(new ClickListener() {
            @Override
            public void clicked(InputEvent event, float x, float y) {
                Gdx.app.exit();
            }
        });
    }

    @Override
    public void render(float delta) {
        super.render(delta);
        stage.draw();
    }

    @Override
    public void resize(int width, int height) {
        super.resize(width, height);
        stage.getViewport().update(width, height, true);
    }
}

@@ -728,16 +728,65 @@
 ground;%0A
+import sk.tuke.gamedev.iddqd.tukequest.util.Log;%0A
 import s
@@ -2663,32 +2663,127 @@
 .draw();%0A    %7D%0A%0A
+    @Override%0A    public void pause() %7B%0A        Log.i(this, %22Not pausing menu screen%22);%0A    %7D%0A%0A
     @Override%0A  

Disable pause on menu screen