I'm using this project to learn how to make a libgdx game. I tried following tutorials online to setup a menu like this but it force closes when I click on the play button. The logcat says that there is an error where it says game.setScreen(new SelectScreen());
MenuButton localMenuButton1 = new MenuButton(this, "", localTextButtonStyle1);
localMenuButton1.addListener(new ClickListener()
{
@Override
public void clicked(InputEvent paramAnonymousInputEvent, float paramAnonymousFloat1, float paramAnonymousFloat2)
{
game.setScreen(new SelectScreen(game));
}
});
I've searched all over the net trying to find a solution but can't find anything. Any help would be appreciated.